org.wso2.registry
Class CollectionImpl

java.lang.Object
  extended by org.wso2.registry.ResourceImpl
      extended by org.wso2.registry.CollectionImpl
All Implemented Interfaces:
Collection, Resource
Direct Known Subclasses:
CollectionVersionImpl

public class CollectionImpl
extends ResourceImpl
implements Collection


Field Summary
protected  int childCount
           
 
Fields inherited from class org.wso2.registry.ResourceImpl
authorUserName, content, contentID, contentModified, contentStream, createdTime, dataSource, description, directory, id, lastModified, lastUpdaterUserName, matchingSnapshotID, mediaType, parentPath, path, permanentPath, properties, propertiesModified, resourceDAO, snapshotID, state, versionableChange, versionNumber
 
Constructor Summary
CollectionImpl()
           
CollectionImpl(java.lang.String[] paths)
           
 
Method Summary
 int getChildCount()
           
 java.lang.String[] getChildren()
           
 java.lang.String[] getChildren(int start, int pageLen)
           
 java.util.List<Resource> getChildResources()
           
 java.lang.Object getContent()
          Collection's content is a string array, which contains paths of its children.
 void setChildCount(int count)
           
 void setContent(java.lang.Object content)
           
 
Methods inherited from class org.wso2.registry.ResourceImpl
addAspect, addProperty, editPropertyValue, getAspects, getAuthorUserName, getContentID, getContentStream, getCreatedTime, getDescription, getId, getLastModified, getLastUpdaterUserName, getMatchingSnapshotID, getMediaType, getParentPath, getPath, getPermanentPath, getProperties, getProperty, getPropertyValues, getSnapshotID, getState, getVersionNumber, isContentModified, isPropertiesModified, isVersionableChange, removeAspect, removeProperty, removePropertyValue, setAuthorUserName, setContentID, setContentModified, setContentStream, setCreatedTime, setDataSource, setDescription, setId, setLastModified, setLastUpdaterUserName, setMatchingSnapshotID, setMediaType, setParentPath, setPath, setProperties, setPropertiesModified, setProperty, setProperty, setSnapshotID, setState, setVersionableChange, setVersionNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.wso2.registry.Resource
addAspect, addProperty, editPropertyValue, getAspects, getAuthorUserName, getContentStream, getCreatedTime, getDescription, getId, getLastModified, getLastUpdaterUserName, getMediaType, getParentPath, getPath, getPermanentPath, getProperties, getProperty, getPropertyValues, getState, removeAspect, removeProperty, removePropertyValue, setContentStream, setDescription, setMediaType, setProperties, setProperty, setProperty
 

Field Detail

childCount

protected int childCount
Constructor Detail

CollectionImpl

public CollectionImpl()

CollectionImpl

public CollectionImpl(java.lang.String[] paths)
Method Detail

setContent

public void setContent(java.lang.Object content)
Specified by:
setContent in interface Resource
Overrides:
setContent in class ResourceImpl

getChildren

public java.lang.String[] getChildren()
                               throws RegistryException
Specified by:
getChildren in interface Collection
Throws:
RegistryException

getChildren

public java.lang.String[] getChildren(int start,
                                      int pageLen)
                               throws RegistryException
Specified by:
getChildren in interface Collection
Throws:
RegistryException

getChildResources

public java.util.List<Resource> getChildResources()

getChildCount

public int getChildCount()
                  throws RegistryException
Specified by:
getChildCount in interface Collection
Throws:
RegistryException

setChildCount

public void setChildCount(int count)
Specified by:
setChildCount in interface Collection

getContent

public java.lang.Object getContent()
                            throws RegistryException
Collection's content is a string array, which contains paths of its children. These paths are loaded on demand to increase performance. It is recommended to use getChildren(...) method to get child paths of a collection, which provides pagination. Calling this method will load all child paths.

Specified by:
getContent in interface Resource
Overrides:
getContent in class ResourceImpl
Returns:
String array of child paths.
Throws:
RegistryException - On any error.


Copyright © 2007 Apache Web Services Project. All Rights Reserved.