SAP NetWeaver '04

com.sap.netweaver.bc.rf.mi.namespace
Interface INamespaceManager

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.mi_api.jar]
All Known Subinterfaces:
IMutableNamespaceManager

public interface INamespaceManager

Read-Only interface describing a repository sub manager for namespace. Namespace means the realm of names the resources fill in the repository. This manager mainly provides means to traverse resources in the namespace.


Method Summary
 long countResources(IResourceHandle rootResourceHandle, IFindResourcesDescriptor findResourcesDescriptor)
          Count resources matching certain criteria specified in the find resources descriptor returning their number.
 java.util.Iterator findResources(IResourceHandle rootResourceHandle, IFindResourcesDescriptor findResourcesDescriptor, int startIndex, int fetchSize)
          Find resources matching certain criteria specified in the find resources descriptor returning an iterator for the results.
 java.util.List findResources(IResourceHandle rootResourceHandle, IFindResourcesDescriptor findResourcesDescriptor, int offset, int length, java.lang.Object resultStateDescriptor)
          Find resources matching certain criteria specified in the find resources descriptor returning a list of the results.
 OrderMechanism getCollectionOrderMechanism(IResourceHandle resourceHandle)
          Returns the OrderMechanism of the collection.
 ILinkDescriptor getLinkDescriptor(IResourceHandle resourceHandle)
          Returns the ILinkDescriptor of the link.
 IQueryBuilder getQueryBuilder()
          Get a search manager specific query builder, which may be used to build query expressions of type com.sap.netweaver.bc.rf.common.search.IQueryExpression.
 boolean isCollection(IResourceHandle handle)
          Check if a resource handle denotes a resource collection.
 boolean isLink(IResourceHandle handle)
          Check if a resource handle denotes a resource link, i.e. a resource linking to another resource.
 boolean isQueryPropertyNameUnderstood(IName propertyName)
          Return whether or not the manager has special knowledge about the given property, i.e. undestands the semantic of this property.
 

Method Detail

findResources

public java.util.List findResources(IResourceHandle rootResourceHandle,
                                    IFindResourcesDescriptor findResourcesDescriptor,
                                    int offset,
                                    int length,
                                    java.lang.Object resultStateDescriptor)
                             throws ResourceException,
                                    OperationNotSupportedException
Find resources matching certain criteria specified in the find resources descriptor returning a list of the results.
Parameters:
rootResourceHandle - root resource handle
findResourcesDescriptor - find resources descriptor
offset - if a positive number, the first n matching resources will be skipped; 0 reports all results
length - if a positive number, only the top number of matching resources will be returned; if less entries are returned no more data is available, if exact <length> entries are returned there might be more and a new call with <oldoffset> + <length> as the new offset is recommended to determine whether the overall result was complete; a negative number reports all results
resultStateDescriptor - optional parameter identifying a former query and their results; if the implementation is able to keep a "session state" for upcoming calls this state can be passed as an extra argument. In this case the result of this query should be a special object (implementing List) with a getter for the session result state descriptor object
Returns:
list of the resources matching the find resources descriptor criteria
Throws:
OperationNotSupportedException - Exception raised when the iterator based counterpart is implemented only
ResourceException - Exception raised in failure situation
See Also:
IFindResourcesDescriptor, IResultStateList

findResources

public java.util.Iterator findResources(IResourceHandle rootResourceHandle,
                                        IFindResourcesDescriptor findResourcesDescriptor,
                                        int startIndex,
                                        int fetchSize)
                                 throws ResourceException,
                                        OperationNotSupportedException
Find resources matching certain criteria specified in the find resources descriptor returning an iterator for the results.
Parameters:
rootResourceHandle - root resource handle
findResourcesDescriptor - find resources descriptor
startIndex - start index from which on the matching resources will be returned; support is not mandatory; 0 reports all results
fetchSize - hint for the implementation how often next() will usually be called in a row; support is not mandatory and fetchSize may be internally overwritten to be of a more optimal value not throwing an exception; 0 defines no hint
Returns:
iterator over the resources matching the find resources descriptor criteria
Throws:
OperationNotSupportedException - Exception raised when the list based counterpart is implemented only
ResourceException - Exception raised in failure situation
See Also:
IFindResourcesDescriptor

countResources

public long countResources(IResourceHandle rootResourceHandle,
                           IFindResourcesDescriptor findResourcesDescriptor)
                    throws ResourceException,
                           OperationNotSupportedException
Count resources matching certain criteria specified in the find resources descriptor returning their number.
Parameters:
rootResourceHandle - root resource handle
findResourcesDescriptor - find resources descriptor
Returns:
number of resources matching the find resources descriptor criteria
Throws:
ResourceException - Exception raised in failure situation
OperationNotSupportedException - Exception raised in failure situation
See Also:
IFindResourcesDescriptor

getQueryBuilder

public IQueryBuilder getQueryBuilder()
                              throws ResourceException,
                                     OperationNotSupportedException
Get a search manager specific query builder, which may be used to build query expressions of type com.sap.netweaver.bc.rf.common.search.IQueryExpression.
Returns:
search manager specific query builder
Throws:
ResourceException - Exception raised in failure situation
OperationNotSupportedException - Exception raised in failure situation

isQueryPropertyNameUnderstood

public boolean isQueryPropertyNameUnderstood(IName propertyName)
                                      throws ResourceException,
                                             OperationNotSupportedException
Return whether or not the manager has special knowledge about the given property, i.e. undestands the semantic of this property. This is interesting for a client to know, when queries about special, e. g. live properties like DAV:supported-method-set, are done. In case the search manager does not understand the property, the client might want to test this property himself.
Parameters:
propertyName - property name
Returns:
true when the manager has special knowledge about the given property, i.e. undestands the semantic of this property
Throws:
ResourceException - Exception raised in failure situation
OperationNotSupportedException - Exception raised in failure situation

isCollection

public boolean isCollection(IResourceHandle handle)
                     throws ResourceException
Check if a resource handle denotes a resource collection.
Parameters:
handle - resource handle
Returns:
true if the resource handle identifies a collection
Throws:
ResourceException - Exception raised in failure situation

isLink

public boolean isLink(IResourceHandle handle)
               throws ResourceException
Check if a resource handle denotes a resource link, i.e. a resource linking to another resource.
Parameters:
handle - resource handle
Returns:
true if the resource handle identifies a link
Throws:
ResourceException - Exception raised in failure situation

getCollectionOrderMechanism

public OrderMechanism getCollectionOrderMechanism(IResourceHandle resourceHandle)
                                           throws ResourceException
Returns the OrderMechanism of the collection.
Parameters:
resourceHandle - resource handle of the collection
Returns:
the OrderMechanism of the collection.
Throws:
ResourceException - Exception raised in failure situation

getLinkDescriptor

public ILinkDescriptor getLinkDescriptor(IResourceHandle resourceHandle)
                                  throws ResourceException
Returns the ILinkDescriptor of the link.
Parameters:
resourceHandle - resource handle of the link
Returns:
the ILinkDescriptor of the link.
Throws:
ResourceException - Exception raised in failure situation

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.