|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.registry.core.ResourceImpl
org.wso2.carbon.registry.core.CollectionImpl
public class CollectionImpl
The default registry implementation of the Collection interface.
| Field Summary | |
|---|---|
protected int |
childCount
The number of children in this collection. |
| Fields inherited from class org.wso2.carbon.registry.core.ResourceImpl |
|---|
authorUserName, content, contentModified, createdTime, dataAccessManager, dbBasedContentID, description, directory, id, lastModified, lastUpdaterUserName, matchingSnapshotID, mediaType, name, parentPath, path, pathID, permanentPath, properties, propertiesModified, resourceDAO, snapshotID, state, tenantId, userName, userRealm, uuid, versionableChange, versionNumber |
| Fields inherited from interface org.wso2.carbon.registry.core.Collection |
|---|
ALLOW_ALL, ALLOW_SELECTED, DENY_SELECTED |
| Constructor Summary | |
|---|---|
CollectionImpl()
The default constructor of the CollectionImpl, Create an empty collection with no children. |
|
CollectionImpl(CollectionImpl collection)
A copy constructor used to create a shallow-copy of this collection. |
|
CollectionImpl(String[] paths)
Construct a collection with the provided children paths. |
|
CollectionImpl(String path,
ResourceDO resourceDO)
Construct a collection with the provided path and the resource data object. |
|
| Method Summary | |
|---|---|
void |
fillCollectionCopy(CollectionImpl collection)
Copy all the values of the current collection attribute to the passed collection. |
protected String[] |
fixPaths(String[] paths)
Method to fix duplicated entries in a collection's child paths. |
int |
getChildCount()
Method to return the the number of children. |
String[] |
getChildren()
Method to return the children. |
String[] |
getChildren(int start,
int pageLen)
Method to return the paths of the selected range of children. |
Object |
getContent()
Collection's content is a string array, which contains paths of its children. |
ResourceImpl |
getShallowCopy()
Method to return a shallow copy of a collection. |
void |
setChildCount(int count)
Method to set the child count. |
void |
setChildren(String[] paths)
Method to set the absolute paths of the children belonging to this collection. |
void |
setContent(Object content)
Implementation for the setContent. |
void |
setContentWithNoUpdate(Object content)
Set the resource content without marking the collection as updated.Here the content should always be a array of strings which corresponding to the children paths. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.wso2.carbon.registry.core.Resource |
|---|
addAspect, addProperty, discard, editPropertyValue, getAspects, getAuthorUserName, getContentStream, getCreatedTime, getDescription, getId, getLastModified, getLastUpdaterUserName, getMediaType, getParentPath, getPath, getPermanentPath, getProperties, getProperty, getPropertyValues, getState, getUUID, isVersionableChange, removeAspect, removeProperty, removePropertyValue, setContentStream, setDescription, setMediaType, setProperties, setProperty, setProperty, setUUID, setVersionableChange |
| Field Detail |
|---|
protected int childCount
| Constructor Detail |
|---|
public CollectionImpl()
public CollectionImpl(String[] paths)
paths - the children paths.
public CollectionImpl(String path,
ResourceDO resourceDO)
path - the path of the collection.resourceDO - the resource data object.public CollectionImpl(CollectionImpl collection)
collection - the collection of which the copy is created.| Method Detail |
|---|
public void setContent(Object content)
throws RegistryException
setContent in interface org.wso2.carbon.registry.api.ResourcesetContent in class ResourceImplcontent - array of strings which corresponding to the children paths.
RegistryException - if the operation fails.
public void setContentWithNoUpdate(Object content)
throws RegistryException
setContentWithNoUpdate in class ResourceImplcontent - array of strings which corresponding to the children paths.
RegistryException - if the operation fails.
public void setChildren(String[] paths)
throws RegistryException
setChildren in interface org.wso2.carbon.registry.api.Collectionpaths - the array of absolute paths of the children
RegistryException - if the operation fails.
public String[] getChildren()
throws RegistryException
getChildren in interface org.wso2.carbon.registry.api.CollectionRegistryException - if the operation fails.
public String[] getChildren(int start,
int pageLen)
throws RegistryException
getChildren in interface org.wso2.carbon.registry.api.Collectionstart - the starting number of children.pageLen - the number of entries to retrieve.
RegistryException - if the operation fails.
public int getChildCount()
throws RegistryException
getChildCount in interface org.wso2.carbon.registry.api.CollectionRegistryException - if the operation fails.public void setChildCount(int count)
count - the child count.
public Object getContent()
throws RegistryException
getChildren()
method to get child paths of a collection, which provides pagination. Calling this method
will load all child paths.
getContent in interface org.wso2.carbon.registry.api.ResourcegetContent in class ResourceImplRegistryException - On any error.
public ResourceImpl getShallowCopy()
throws RegistryException
getShallowCopy in class ResourceImplRegistryException - if the operation fails.
public void fillCollectionCopy(CollectionImpl collection)
throws RegistryException
collection - the collection to get all the current collection attribute copied.
RegistryException - if the operation fails.protected String[] fixPaths(String[] paths)
paths - the collection's child paths.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||