com.ibm.xsp.registry
Interface FacesLibrary


public interface FacesLibrary

This is a wrapper for a collection of FacesLibraryFragments that have the same namespaceUri. It allows Definitions with the same identifier to override each other, so that only the last one registered will be available.

Please note, a FacesLibrary's FacesLibraryFragment's FacesRegistry is not necessarily the same as the FacesLibrary's FacesRegistry.

This contains redundant methods, but the entire class is redundant - it's only a convenience for accessing all those FacesProject's FacesLibraryFragments that have the same namespace URI.


Method Summary
 FacesDefinition getDefinition(java.lang.String id)
          Returns the definition with the given id.
 java.util.List<FacesDefinition> getDefs()
          An Iterator over the FacesDefinitions in all the library fragments that have a unique id.
 java.util.List<FacesLibraryFragment> getFiles()
          All of the FacesLibraryFragment files that contribute to this namespace.
 java.lang.String getFirstDefaultPrefix()
          Finds a default prefix from one of the FacesLibraryFragments.
 java.lang.String getNamespaceUri()
          The same as the value returned from getIdentifier
 FacesRegistry getRegistry()
          The FacesRegistry this FacesLibrary is registered in.
 

Method Detail

getNamespaceUri

java.lang.String getNamespaceUri()
The same as the value returned from getIdentifier


getRegistry

FacesRegistry getRegistry()
The FacesRegistry this FacesLibrary is registered in.


getFiles

java.util.List<FacesLibraryFragment> getFiles()
All of the FacesLibraryFragment files that contribute to this namespace. Generally you should not access the library files and their contents directly, but use the definition methods in this library interface, because they have been implemented to correctly ignore duplicate definitions.


getDefinition

FacesDefinition getDefinition(java.lang.String id)
Returns the definition with the given id. This is the last definition with the given id, as later config files can overwrite definitions in earlier files. When there are duplicate definition ids, the earlier definition should usually be ignored, as it cannot be resolved by namespace/tagName when used in a .xsp file. Duplicate definitions may still be referenced by FacesDefinition.getReferenceId(), for example, they may be the parent of some other tag. Note the distinction between the referenceId and the id FacesDefinition.getId().


getDefs

java.util.List<FacesDefinition> getDefs()
An Iterator over the FacesDefinitions in all the library fragments that have a unique id. It will be ordered so that the last fragments registered will be returned first. If two definitions are registered in different fragments with the same name, the only one from the fragment registered last will be returned.

Note, it doesn't iterate over the FacesRenderKitFragment definitions, so won't return the FacesRendererDefinitions. (See FacesDefinition.getId().)


getFirstDefaultPrefix

java.lang.String getFirstDefaultPrefix()
Finds a default prefix from one of the FacesLibraryFragments. Checks in the reverse order to how the fragments were registered. This method is redundant, since the value can easily be retrieved by traversing the fragments, but it is convenient. This value may be used by the Domino Designer editor as the suggested xmlns prefix to be used as an alias for the namespace in the xsp file. It may not be used, for example, if there are other suggested default prefixes for the namespace in a more-relevant registry, or if the prefix conflicts with suggested default prefixes for other namespaces.

Returns:
null or a suggested xmlns prefix to be used as an alias for the namespace in xsp files.