SAP NetWeaver '04

com.sapportals.wcm.repository
Interface ICollection

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
All Superinterfaces:
IResource, ITypeCast

public interface ICollection
extends IResource

A collection is a resource (IResource) that contains other resources and collections following the composite pattern.

Copyright (c) SAP AG 2001-2004


Method Summary
 ICollection createCollection(java.lang.String name, IPosition position, IPropertyMap properties)
          Creates a new sub collection in a collection that supports ordering.
 ICollection createCollection(java.lang.String name, IPosition position, IPropertyMap properties, boolean ignorePropertyFailures)
          Creates a new sub collection in a collection that supports ordering.
 ICollection createCollection(java.lang.String name, IPropertyMap properties)
          Creates a new sub collection in a collection.
 ICollection createCollection(java.lang.String name, IPropertyMap properties, boolean ignorePropertyFailures)
          Creates a new sub collection in a collection.
 IResource createLink(java.lang.String name, URL targetURL, LinkType linkType, IPosition position, IPropertyMap properties)
          Creates a new link in a collection that supports ordering.
 IResource createLink(java.lang.String name, URL targetURL, LinkType linkType, IPosition position, IPropertyMap properties, boolean ignorePropertyFailures)
          Creates a new link in a collection that supports ordering.
 IResource createLink(java.lang.String name, URL targetURL, LinkType linkType, IPropertyMap properties)
          Creates a new link in a collection.
 IResource createLink(java.lang.String name, URL targetURL, LinkType linkType, IPropertyMap properties, boolean ignorePropertyFailures)
          Creates a new link in a collection.
 ILockInfo createResource(java.lang.String name, ILockProperties lockProperties)
          Creates a empty resource that is initially locked (lock null resource)
 IResource createResource(java.lang.String name, IPosition position, IPropertyMap properties, IContent content)
          Creates a new resource in a collection that supports ordering.
 IResource createResource(java.lang.String name, IPosition position, IPropertyMap properties, IContent content, boolean ignorePropertyFailures)
          Creates a new resource in a collection that supports ordering.
 IResource createResource(java.lang.String name, IPropertyMap properties, IContent content)
          Creates a new resource in a collection.
 IResource createResource(java.lang.String name, IPropertyMap properties, IContent content, boolean ignorePropertyFailures)
          Creates a new resource in a collection.
 IResourceList getChildren()
          Returns a list of all resources in the collection
 IResourceList getChildren(boolean visible, boolean collections, boolean links)
          Returns a filtered list of the resources in this collection.
 IResourceList getChildren(Selector childrenSelector, Collator sortBy, IPropertyNameList propertyPrefill)
          Returns the children of this collection.
 IResourceList getChildren(Selector childrenSelector, Collator sortBy, IPropertyNameList propertyPrefill, java.lang.String[] permissionNames)
          Returns the children of this collection.
 int getChildrenCount(boolean visible, boolean collections, boolean links)
          Returns the number of children in the collection
 OrderType getOrderType()
          Returns the order type of a collection
 boolean hasChildren()
          True if the collection has at least one child resource
 void reorder(IReorderList list)
          Change the position of some or all resources in an ordered collection.
 void setOrderType(OrderType orderType)
          Set the order type of a collection
 
Methods inherited from interface com.sapportals.wcm.repository.IResource
as, checkIn, checkIn, checkIn, checkIn, checkOut, copy, copy, copy, copy, delete, deleteProperty, enableVersioning, getAccessRID, getAccessURI, getCheckedOutResources, getContent, getContent, getContext, getCreatedBy, getCreationDate, getDescription, getDisplayName, getDisplayName, getETag, getInheritedProperty, getLanguage, getLastModified, getLastModifiedBy, getLinkType, getLockByToken, getLocks, getName, getParentCollection, getProperties, getProperties, getProperty, getRepositoryManager, getResourceType, getRevisionID, getRID, getSupportedEvents, getSupportedOptions, getTargetResource, getTargetURL, getUnfilteredContent, getUnfilteredContent, getURI, getVersionHistory, isA, isCheckedOut, isCollection, isHidden, isLocked, isLockedByMe, isReadOnly, isRevision, isVersioned, lock, lock, move, move, move, move, refreshLock, rename, search, setAsCurrentVersion, setLinkType, setProperties, setProperties, setProperty, setTargetURL, undoCheckOut, unlock, update, updateContent
 
Methods inherited from interface com.sapportals.wcm.repository.so.ITypeCast
listTypes
 

Method Detail

getChildren

public IResourceList getChildren()
                          throws ResourceException,
                                 AccessDeniedException
Returns a list of all resources in the collection
Returns:
A list of resources
Throws:
ResourceException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

getChildren

public IResourceList getChildren(boolean visible,
                                 boolean collections,
                                 boolean links)
                          throws ResourceException,
                                 AccessDeniedException
Returns a filtered list of the resources in this collection.
Parameters:
visible - true: only visible resource (system property "hidden" is false), false: only hidden resources
collections - true: only collections, false: only resources which are not collections
links - true: only links, false: only non-link resources
Returns:
A list of resources
Throws:
ResourceException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

getChildrenCount

public int getChildrenCount(boolean visible,
                            boolean collections,
                            boolean links)
                     throws ResourceException,
                            AccessDeniedException
Returns the number of children in the collection
Parameters:
visible - true: only visible resource (system property "hidden" is false), false: only hidden resources
collections - true: only collections, false: only resources which are not collections
links - true: only links, false: only non-link resources
Returns:
childrenCount
Throws:
ResourceException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

getChildren

public IResourceList getChildren(Selector childrenSelector,
                                 Collator sortBy,
                                 IPropertyNameList propertyPrefill)
                          throws ResourceException,
                                 AccessDeniedException
Returns the children of this collection. The list of children can be filtered and sorted by properties. A child resource is not included in the result if the user in the context does not have read permission for the properties (this is true if at least one parameter is used (not null) which will cause properties to be fetched: Collator, Selector or propertyPrefill).
Parameters:
childrenSelector - Specifies the filter expression
sortBy - Specifies the ordering of the returned list. Children which are collections are grouped together and are placed BEFORE the non-collections.
propertyPrefill - Specifies the names of properties which should be fetched for the children of the collection in addition to those needed for filtering and sorting. This "prefetching" can improve performance of subsequent getProperty() calls on the child resources.
Throws:
ResourceException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

getChildren

public IResourceList getChildren(Selector childrenSelector,
                                 Collator sortBy,
                                 IPropertyNameList propertyPrefill,
                                 java.lang.String[] permissionNames)
                          throws ResourceException,
                                 AccessDeniedException
Returns the children of this collection. The list of children can be filtered by properties and permissions and sorted by properties. A child resource is not included in the result if the user in the context does not have read permission for the properties (this is true if at least one parameter is used (not null) which will cause properties to be fetched: Collator, Selector or propertyPrefill).
Parameters:
childrenSelector - Specifies the filter expression
sortBy - Specifies the ordering of the returned list. Children which are collections are grouped together and are placed BEFORE the non-collections.
propertyPrefill - Specifies the names of properties which should be fetched for the children of the collection in addition to those needed for filtering and sorting. This "prefetching" can improve performance of subsequent getProperty() calls on the child resources.
permissionNames - An array of permission names (permission name constants are defined in IPermission). Resources for which the user in the context does not have one of the secified permissions are removed from the result list.
Throws:
ResourceException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

hasChildren

public boolean hasChildren()
                    throws ResourceException
True if the collection has at least one child resource
Throws:
ResourceException -  

getOrderType

public OrderType getOrderType()
                       throws ResourceException
Returns the order type of a collection
Returns:
The order type
Throws:
ResourceException -  

setOrderType

public void setOrderType(OrderType orderType)
                  throws ResourceException,
                         NotSupportedException,
                         AccessDeniedException
Set the order type of a collection
Parameters:
orderType - orderType to be set
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

reorder

public void reorder(IReorderList list)
             throws ResourceException,
                    NotSupportedException,
                    AccessDeniedException
Change the position of some or all resources in an ordered collection. Positioning failures will be reported via one or more resource exception (the RIDs will refer to the resource that couldn't be positioned).
Parameters:
list - A list that contains IPositioning instances that specify how the resources in the collection should be positioned.
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createCollection

public ICollection createCollection(java.lang.String name,
                                    IPropertyMap properties)
                             throws ResourceException,
                                    NotSupportedException,
                                    AccessDeniedException
Creates a new sub collection in a collection.
Parameters:
name - The name of the new collection.
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
Returns:
The new collection
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createCollection

public ICollection createCollection(java.lang.String name,
                                    IPosition position,
                                    IPropertyMap properties)
                             throws ResourceException,
                                    NotSupportedException,
                                    AccessDeniedException
Creates a new sub collection in a collection that supports ordering.
Parameters:
name - The name of the new collection
position - The position in the collection
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
Returns:
The new collection
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createCollection

public ICollection createCollection(java.lang.String name,
                                    IPropertyMap properties,
                                    boolean ignorePropertyFailures)
                             throws ResourceException,
                                    NotSupportedException,
                                    AccessDeniedException
Creates a new sub collection in a collection.
Parameters:
name - The name of the new collection.
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
ignorePropertyFailures - Ignore exceptions if some or all properties could not be set/removed
Returns:
The new collection
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createCollection

public ICollection createCollection(java.lang.String name,
                                    IPosition position,
                                    IPropertyMap properties,
                                    boolean ignorePropertyFailures)
                             throws ResourceException,
                                    NotSupportedException,
                                    AccessDeniedException
Creates a new sub collection in a collection that supports ordering.
Parameters:
name - The name of the new collection
position - The position in the collection
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
ignorePropertyFailures - Ignore exception if some or all properties could not be set/removed
Returns:
The new collection
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createResource

public IResource createResource(java.lang.String name,
                                IPropertyMap properties,
                                IContent content)
                         throws ResourceException,
                                NotSupportedException,
                                AccessDeniedException
Creates a new resource in a collection.
Parameters:
name - The name of the resource
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
content - The new content
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createResource

public IResource createResource(java.lang.String name,
                                IPosition position,
                                IPropertyMap properties,
                                IContent content)
                         throws ResourceException,
                                NotSupportedException,
                                AccessDeniedException
Creates a new resource in a collection that supports ordering.
Parameters:
name - The name of the resource
position - Ths positioning information
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
content - The new content
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createResource

public IResource createResource(java.lang.String name,
                                IPropertyMap properties,
                                IContent content,
                                boolean ignorePropertyFailures)
                         throws ResourceException,
                                NotSupportedException,
                                AccessDeniedException
Creates a new resource in a collection.
Parameters:
name - The name of the resource
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
content - The new content
ignorePropertyFailures - Ignore exception if some or all properties could not be set/removed
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createResource

public IResource createResource(java.lang.String name,
                                IPosition position,
                                IPropertyMap properties,
                                IContent content,
                                boolean ignorePropertyFailures)
                         throws ResourceException,
                                NotSupportedException,
                                AccessDeniedException
Creates a new resource in a collection that supports ordering.
Parameters:
name - The name of the resource
position - The positioning information
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
content - The new content
ignorePropertyFailures -  
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createResource

public ILockInfo createResource(java.lang.String name,
                                ILockProperties lockProperties)
                         throws ResourceException,
                                NotSupportedException,
                                AccessDeniedException
Creates a empty resource that is initially locked (lock null resource)
Parameters:
name - The name of the resource
lockProperties - The properties of the lock
Returns:
LockInfo that contains the lock token
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createLink

public IResource createLink(java.lang.String name,
                            URL targetURL,
                            LinkType linkType,
                            IPropertyMap properties)
                     throws ResourceException,
                            NotSupportedException,
                            AccessDeniedException
Creates a new link in a collection.
Parameters:
name - The name of the resource
targetURL - The link target
linkType - The link type
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createLink

public IResource createLink(java.lang.String name,
                            URL targetURL,
                            LinkType linkType,
                            IPosition position,
                            IPropertyMap properties)
                     throws ResourceException,
                            NotSupportedException,
                            AccessDeniedException
Creates a new link in a collection that supports ordering.
Parameters:
name - The name of the resource
targetURL - The link target
linkType - The link type
position - The positioning information
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createLink

public IResource createLink(java.lang.String name,
                            URL targetURL,
                            LinkType linkType,
                            IPropertyMap properties,
                            boolean ignorePropertyFailures)
                     throws ResourceException,
                            NotSupportedException,
                            AccessDeniedException
Creates a new link in a collection.
Parameters:
name - The name of the resource
targetURL - The link target
linkType - The link type
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
ignorePropertyFailures -  
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

createLink

public IResource createLink(java.lang.String name,
                            URL targetURL,
                            LinkType linkType,
                            IPosition position,
                            IPropertyMap properties,
                            boolean ignorePropertyFailures)
                     throws ResourceException,
                            NotSupportedException,
                            AccessDeniedException
Creates a new link in a collection that supports ordering.
Parameters:
name - The name of the resource
targetURL - The link target
linkType - The link type
position - The positioning information
properties - The intial properties to set for the new resource. The repository will try to set all properties in the map.
ignorePropertyFailures -  
Returns:
The new resource
Throws:
ResourceException -  
NotSupportedException -  
AccessDeniedException - If the resource is locked, readonly or authorization failed

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.