org.wso2.carbon.registry.core
Interface Collection

All Superinterfaces:
org.wso2.carbon.registry.api.Collection, org.wso2.carbon.registry.api.Resource

public interface Collection
extends Resource, org.wso2.carbon.registry.api.Collection

The Collection Interface. Collection is specific type of resource that can contain other resources (including other collections). We call the resource contained in a collection as the children of the collection and the collection is called the parent of its children. The path of the child = The path of the parent + RegistryConstant.SEPERATOR + The resource name of the child. The ROOT collection is a specific instance of the Collection interface which doesn't have a parent.


Field Summary
static String ALLOW_ALL
          Deprecated. 
static String ALLOW_SELECTED
          Deprecated. 
static String DENY_SELECTED
          Deprecated. 
 
Method Summary
 int getChildCount()
          Method to return the the number of children.
 String[] getChildren()
          Method to return the absolute paths of the children of the collection
 String[] getChildren(int start, int pageLen)
          Method to return the paths of the selected range of children.
 void setChildren(String[] paths)
          Method to set the absolute paths of the children belonging to this collection.
 
Methods inherited from interface org.wso2.carbon.registry.core.Resource
addAspect, addProperty, discard, editPropertyValue, getAspects, getAuthorUserName, getContent, getContentStream, getCreatedTime, getDescription, getId, getLastModified, getLastUpdaterUserName, getMediaType, getParentPath, getPath, getPermanentPath, getProperties, getProperty, getPropertyValues, getState, getUUID, isVersionableChange, removeAspect, removeProperty, removePropertyValue, setContent, setContentStream, setDescription, setMediaType, setProperties, setProperty, setProperty, setUUID, setVersionableChange
 

Field Detail

ALLOW_ALL

@Deprecated
static final String ALLOW_ALL
Deprecated. 
See Also:
Constant Field Values

ALLOW_SELECTED

@Deprecated
static final String ALLOW_SELECTED
Deprecated. 
See Also:
Constant Field Values

DENY_SELECTED

@Deprecated
static final String DENY_SELECTED
Deprecated. 
See Also:
Constant Field Values
Method Detail

getChildren

String[] getChildren()
                     throws RegistryException
Method to return the absolute paths of the children of the collection

Specified by:
getChildren in interface org.wso2.carbon.registry.api.Collection
Returns:
the array of absolute paths of the children
Throws:
RegistryException - if the operation fails.

getChildren

String[] getChildren(int start,
                     int pageLen)
                     throws RegistryException
Method to return the paths of the selected range of children.

Specified by:
getChildren in interface org.wso2.carbon.registry.api.Collection
Parameters:
start - the starting number of children.
pageLen - the number of entries to retrieve.
Returns:
an array of paths of the selected range of children.
Throws:
RegistryException - if the operation fails.

getChildCount

int getChildCount()
                  throws RegistryException
Method to return the the number of children.

Specified by:
getChildCount in interface org.wso2.carbon.registry.api.Collection
Returns:
the number of children.
Throws:
RegistryException - if the operation fails.

setChildren

void setChildren(String[] paths)
                 throws RegistryException
Method to set the absolute paths of the children belonging to this collection. Absolute paths begin from the ROOT collection.

Specified by:
setChildren in interface org.wso2.carbon.registry.api.Collection
Parameters:
paths - the array of absolute paths of the children
Throws:
RegistryException - if the operation fails.


Copyright © 2012 WSO2 Inc. All Rights Reserved.