com.ibm.xsp.registry
Interface FacesLibraryFragment

All Superinterfaces:
FacesExtensibleNode, com.ibm.xsp.registry.FacesReferenceContainer

public interface FacesLibraryFragment
extends FacesExtensibleNode, com.ibm.xsp.registry.FacesReferenceContainer

The representation of a config file in the FacesRegistry.

It is a grouping of FacesDefinitions and FacesRenderKitFragments, and some metaData, namely the filePath to the config file relative to the project root, the namespace of all of the tags in the file, and the (optional) default prefix associated with that namespace.


Method Summary
 java.lang.String getDefaultPrefix()
          Returns any default namespace prefix defined in this FacesLibraryFragment.
 FacesDefinition getDefinition(java.lang.String id)
          Returns the FacesDefinition with the specified id, or null if nor found.
 java.util.List<FacesDefinition> getDefs()
          Returns all of the FacesDefinitions registered in this file.
 java.lang.String getFilePath()
          The file path to the config file used to load this fragment.
 java.lang.String getNamespaceUri()
           
 FacesProject getProject()
          The project this FacesLibraryFragment is contained in.
 FacesRenderKitFragment getRenderKitFragment(java.lang.String renderKitId)
          Returns the only FacesRenderKitFragment with the specified renderKitId.
 java.util.List<java.lang.String> getRenderKitIds()
          Returns the renderKitIds of all the FacesRenderKitFragments in this file.
 
Methods inherited from interface com.ibm.xsp.registry.FacesExtensibleNode
getExtension, setExtension
 
Methods inherited from interface com.ibm.xsp.registry.FacesReferenceContainer
refreshReferences
 

Method Detail

getDefs

java.util.List<FacesDefinition> getDefs()
Returns all of the FacesDefinitions registered in this file. It does not include the definitions in the FacesRenderKitFragments. Note, the definitions are unique by id. (See FacesDefinition.getId() and getRenderKitFragment(String))

Returns:
Returns the registered FacesDefinitions.

getRenderKitIds

java.util.List<java.lang.String> getRenderKitIds()
Returns the renderKitIds of all the FacesRenderKitFragments in this file.

Returns:
unmodifiable list of renderKitIds.

getRenderKitFragment

FacesRenderKitFragment getRenderKitFragment(java.lang.String renderKitId)
Returns the only FacesRenderKitFragment with the specified renderKitId. (See FacesRenderKitFragment.getRenderKitId().)


getFilePath

java.lang.String getFilePath()
The file path to the config file used to load this fragment. It is an identifier for this fragment that's unique per FacesProject. It can be passed to com.ibm.xsp.page.file.PageFileSystem#getFile(String) to retrieve the file used to load this fragment. The config file used to load this library fragment needs to be located within this project's pageFileSystem.

Returns:
Returns the file path.

getNamespaceUri

java.lang.String getNamespaceUri()
Returns:
Returns the namespaceUri of the FacesLibrary that this fragment should be part of.

getDefaultPrefix

java.lang.String getDefaultPrefix()
Returns any default namespace prefix defined in this FacesLibraryFragment. e.g. the prefix "f" is often used as an alias for the namespaceUri "http://www.ibm.com/xsp/jsf/core" in xml files, so a FacesLibraryFragment that defined FacesDefinitions in that namespace might specify a defaultPrefix of "f".

Returns:
the default prefix, or null if not present.

getProject

FacesProject getProject()
The project this FacesLibraryFragment is contained in. This cannot be null.

Returns:
Returns the project.

getDefinition

FacesDefinition getDefinition(java.lang.String id)
Returns the FacesDefinition with the specified id, or null if nor found. See FacesDefinition.getId()

Parameters:
id - the id of the FacesDefinition to search for.
Returns:
null or the FacesDefinition with that id.