public class CollectionImpl extends ResourceImpl implements Collection
| Modifier and Type | Field and Description |
|---|---|
protected int |
childCount
The number of children in this collection.
|
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, versionNumberALLOW_ALL, ALLOW_SELECTED, DENY_SELECTED| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addAspect, addProperty, addPropertyWithNoUpdate, clearSessionInformation, discard, editPropertyValue, fillResourceCopy, getAspects, getAuthorUserName, getContentStream, getCreatedTime, getDbBasedContentID, getDescription, getId, getLastModified, getLastUpdaterUserName, getMatchingSnapshotID, getMediaType, getName, getParentPath, getPath, getPathID, getPermanentPath, getProperties, getProperty, getPropertyValues, getResourceDO, getResourceIDImpl, getSnapshotID, getState, getUUID, getVersionNumber, isContentModified, isPropertiesModified, isVersionableChange, prepareContentForPut, pullContentFromOriginal, removeAspect, removeProperty, removePropertyValue, removePropertyWithNoUpdate, setAuthorUserName, setContentModified, setContentStream, setContentStreamWithNoUpdate, setCreatedTime, setDataAccessManager, setDbBasedContentID, setDescription, setId, setLastModified, setLastUpdaterUserName, setMatchingSnapshotID, setMediaType, setName, setParentPath, setPath, setPathID, setProperties, setPropertiesModified, setPropertiesModifiedWithNoUpdate, setProperty, setProperty, setSessionInformation, setSnapshotID, setState, setTenantId, setUserName, setUserRealm, setUUID, setVersionableChange, setVersionNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAspect, 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, setVersionableChangepublic 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.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 childrenRegistryException - 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.Copyright © 2015 WSO2 Inc. All Rights Reserved.