public interface Repository extends RepositoryViewContainer
The id datatypes are not predefined to allow a more flexible mechanism for referencing objects in the repository. For example, a repository for a set of user profiles would probably use a Long object for their id datatype. A Repository over a file system may use String objects which map directly to the file path of html files.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultViewName()
Returns the name of the "default" or "root" RepositoryView
|
RepositoryItem |
getItem(java.lang.String pId)
Deprecated.
this method is replaced by
getItem(String,String) .
If the second argument, i.e. the descriptor name is unknown, then
use getItem(String,getDefaultViewName() ). |
RepositoryItem |
getItem(java.lang.String pId,
java.lang.String pDescriptorName)
Returns an item in the Repository with the given id
|
RepositoryItemDescriptor |
getItemDescriptor(RepositoryItemDescriptor pDesc)
Returns a RepositoryItemDescriptor accessed with the name of the given descriptor.
|
RepositoryItemDescriptor |
getItemDescriptor(java.lang.String pName)
Returns a RepositoryItemDescriptor accessed with the given name.
|
java.lang.String[] |
getItemDescriptorNames()
Returns an array of the names of the known RepositoryItemDescriptors.
|
RepositoryItem[] |
getItems(java.lang.String[] pIds)
Deprecated.
|
RepositoryItem[] |
getItems(java.lang.String[] pIds,
java.lang.String pDescriptorName)
Returns the items with the given ids
|
java.lang.String |
getRepositoryName()
Returns the name of this Repository
|
RepositoryView |
getView(RepositoryItemDescriptor pDesc)
Returns a RepositoryView accessed with the name of the given descriptor.
|
RepositoryView |
getView(java.lang.String pName)
Returns a RepositoryView accessed with the given name.
|
java.lang.String[] |
getViewNames()
Returns an array of the names of all contained top-level views
|
static final java.lang.String CLASS_VERSION
java.lang.String getRepositoryName()
RepositoryItem getItem(java.lang.String pId) throws RepositoryException
getItem(String,String)
.
If the second argument, i.e. the descriptor name is unknown, then
use getItem(String,getDefaultViewName()
).pId
- the id of the item to retrieveRepositoryException
- if there was an error while
attempting to return the RepositoryItemRepositoryItem getItem(java.lang.String pId, java.lang.String pDescriptorName) throws RepositoryException
pId
- the id of the item to retrievepDescriptorName
- the name of the item descriptor that contains
this item.RepositoryException
- if there was an error while
attempting to return the RepositoryItemRepositoryItem[] getItems(java.lang.String[] pIds) throws RepositoryException
RepositoryException
- if there was an error while
attempting to return the RepositoryItemsRepositoryItem[] getItems(java.lang.String[] pIds, java.lang.String pDescriptorName) throws RepositoryException
pIds
- the list of idspDescriptorName
- the item descriptor containing these idsRepositoryException
- if there was an error while
attempting to return the RepositoryItemsjava.lang.String getDefaultViewName()
java.lang.String[] getViewNames()
getViewNames
in interface RepositoryViewContainer
RepositoryView getView(java.lang.String pName) throws RepositoryException
getView
in interface RepositoryViewContainer
pName
- the name of the view to findRepositoryException
- if there was an error while
attempting to return the RepositoryViewRepositoryView getView(RepositoryItemDescriptor pDesc) throws RepositoryException
pDesc
- the descriptor of the view to findRepositoryException
- if there was an error while
attempting to return the RepositoryViewjava.lang.String[] getItemDescriptorNames()
RepositoryItemDescriptor getItemDescriptor(java.lang.String pName) throws RepositoryException
pName
- the name of the descriptor to findRepositoryException
- if there was an error while
attempting to return the RepositoryItemDescriptorRepositoryItemDescriptor getItemDescriptor(RepositoryItemDescriptor pDesc) throws RepositoryException
pDesc
- the descriptor to findRepositoryException
- if there was an error while
attempting to return the RepositoryItemDescriptor