|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The resource factory has methods to create resource objects (IResource) and to access the manager and service factories.
Copyright (c) SAP AG 2001-2004
IManagerFactory| Method Summary | |
boolean |
checkExistence(RID rid,
IResourceContext context)
Returns true if a resource exists for the given resource
identifier.
|
boolean |
checkExistence(URI uri,
IResourceContext context)
Deprecated. As of EP 5.0 SP3, replaced by method with RID parameter. |
IFilterFactory |
getFilterFactory()
Returns a instance of the FilterFactory |
IManagerFactory |
getManagerFactory()
Returns a instance of the ManagerFactory |
java.lang.Object |
getObject(RID rid,
IResourceContext context,
java.lang.Class asClass)
Returns a resource object converted into a semantic object for the given resource identifier and context. |
IResource |
getResource(RID rid,
boolean resolveInternalLinks,
IResourceContext context)
Returns a resource object instance for the given RID and context. |
IResource |
getResource(RID rid,
IResourceContext context)
Returns a resource object instance for the given resource identifier and context. |
IResource |
getResource(RID rid,
IResourceContext context,
boolean createCollections)
Returns a resource object instance for the given RID and context. |
IResource |
getResource(URI uri,
IResourceContext context)
Deprecated. As of EP 5.0 SP3, replaced by getResource() method with RID parameter. |
IResource |
getResource(URI uri,
IResourceContext context,
boolean createCollections)
Deprecated. As of EP 5.0 SP3, replaced by getResource() method with RID parameter. |
IResourceList |
getResources(IRidList ridList,
java.util.Map propertyMaps,
ResourceErrors errors,
IResourceContext context)
Returns a list of resource instances for a list of resource identifiers and possible {@IPropertyMap}s for the resources. |
IResourceList |
getResources(IRidList ridList,
java.util.Map propertyMaps,
ResourceErrors errors,
java.lang.String[] permissionNames,
IResourceContext context)
Returns a list of resource instances for a list of resource identifiers and possible {@IPropertyMap}s for the resources. |
IResourceList |
getResources(IRidList ridList,
ResourceErrors errors,
IResourceContext context)
Returns a list of resource instances for an array of resource identifiers. |
IResourceList |
getResources(IRidList ridList,
ResourceErrors errors,
java.lang.String[] permissionNames,
IResourceContext context)
Returns a list of resource instances for an array of resource identifiers and removes resources without the specified permission(s) from the result list. |
IResourceList |
getResources(IUriList uriList,
ResourceErrors errors,
IResourceContext context)
Deprecated. As of EP 5.0 SP3, replaced by getResources() method with IRidList parameter. |
IResourceContext |
getServiceContext()
Returns a new resource context for services with an anonymous user |
IResourceContext |
getServiceContext(java.lang.String userID)
Returns a new resource context for services with an anonymous user |
IRepositoryServiceFactory |
getServiceFactory()
Returns a instance of the ServiceFactory |
| Method Detail |
public IResource getResource(URI uri,
IResourceContext context)
throws ResourceException,
AuthorizationRequiredException
uri - TBD: Description of the incoming method parametercontext - TBD: Description of the incoming method parameterResourceException - Exception raised in failure situationAuthorizationRequiredException - Exception raised in failure
situation
public IResource getResource(URI uri,
IResourceContext context,
boolean createCollections)
throws ResourceException,
AuthorizationRequiredException
uri - TBD: Description of the incoming method parametercontext - TBD: Description of the incoming method parametercreateCollections - TBD: Description of the incoming method parameterResourceException - Exception raised in failure situationAuthorizationRequiredException - Exception raised in failure
situation
public IResource getResource(RID rid,
IResourceContext context)
throws ResourceException
getResource(rid, true,
context) . Returns null if the resource does not exist.rid - The resource identifier of the resource.context - The resource context.null is returned only
if the resource definitively does not exist. If it can not be created
by the repositoy for some other reason (e.g. internal error) an
appropriate exception such as ServiceUnavailableException will
be thrownResourceException - Exception raised in failure situation
public java.lang.Object getObject(RID rid,
IResourceContext context,
java.lang.Class asClass)
throws ResourceException
rid - TBD: Description of the incoming method parametercontext - TBD: Description of the incoming method parameterasClass - TBD: Description of the incoming method parameterResourceException - Exception raised in failure situation
public IResource getResource(RID rid,
IResourceContext context,
boolean createCollections)
throws ResourceException
rid - The RID of the resourcecreateCollections - If the resource does not exists create a new
collection with that name. All collections in the path will be
created.context - The resource context objectResourceException - Exception raised in failure situation
public IResource getResource(RID rid,
boolean resolveInternalLinks,
IResourceContext context)
throws ResourceException
rid - The RID of the resourceresolveInternalLinks - true : If the RID contains
internal links to collections the framework will find and return the
target resource. In this case the RID of the returned resource will
not be equal to the specified RID parameter. false : If
the RID contains internal links to collections a
InternalLinkException exception is thrown.context - The resource context objectResourceException - Exception raised in failure situationIResource.getRID(),
IResource.getAccessRID()
public IResourceList getResources(IUriList uriList,
ResourceErrors errors,
IResourceContext context)
throws ResourceException
uriList - TBD: Description of the incoming method parametererrors - TBD: Description of the incoming method parametercontext - TBD: Description of the incoming method parameterResourceException - Exception raised in failure situation
public IResourceList getResources(IRidList ridList,
ResourceErrors errors,
IResourceContext context)
throws ResourceException
ResourceErrors instance.ridList - A list of resource identifiers. The list can contain RIDs
from different managers.errors - A reference to a ResourceErrors instance. If
this is null all exceptions will be ignored.context - The resource contextResourceException - Exception raised in failure situation
public IResourceList getResources(IRidList ridList,
ResourceErrors errors,
java.lang.String[] permissionNames,
IResourceContext context)
throws ResourceException
ridList - A list of resource identifiers. The list can contain RIDs
from different managers.errors - A reference to a ResourceErrors instance. If
this is null all exceptions will be ignored.permissionNames - An array of permission names. Permission name
constants are defined in IPermission.context - The resource contextResourceException - Exception raised in failure situation
public IResourceList getResources(IRidList ridList,
java.util.Map propertyMaps,
ResourceErrors errors,
IResourceContext context)
throws ResourceException
Repositories are however encouraged to sacrifice exactness for speed, e.g. prefer the client supplied properties compared to (maybe costly) resource lookups and validations.
ridList - A list of resource identifiers. The list can contain RIDs
from different managers.propertyMaps - a map holding an IPropertyMap with the resource
identifier {@RID} as key.errors - A reference to a ResourceErrors instance. If
this is null all exceptions will be ignored.context - The resource contextResourceException - Exception raised in failure situation
public IResourceList getResources(IRidList ridList,
java.util.Map propertyMaps,
ResourceErrors errors,
java.lang.String[] permissionNames,
IResourceContext context)
throws ResourceException
Repositories are however encouraged to sacrifice exactness for speed, e.g. prefer the client supplied properties compared to (maybe costly) resource lookups and validations.
ridList - A list of resource identifiers. The list can contain RIDs
from different managers.propertyMaps - a map holding an IPropertyMap with the resource
identifier {@RID} as key.errors - A reference to a ResourceErrors instance. If
this is null all exceptions will be ignored.permissionNames - An array of permission names. Permission name
constants are defined in IPermission.context - The resource contextResourceException - Exception raised in failure situation
public boolean checkExistence(URI uri,
IResourceContext context)
throws ResourceException,
AuthorizationRequiredException
public boolean checkExistence(RID rid,
IResourceContext context)
throws ResourceException,
AuthorizationRequiredException
true if a resource exists for the given resource
identifier.
Note that this method should only be used if the caller really only requires this piece of information. Using the
return value to decide whether it makes sense to call getResource(RID, IResourceContext), or to detect whether a particular
RID isn't in use yet DOES NOT WORK due to possible race conditions. Instead, just do the respective method calls
and properly check results/exceptions.
rid - The RID to checkcontext - The resource contextResourceException - Exception raised in failure situationAuthorizationRequiredException - Exception raised in failure
situation
public IRepositoryServiceFactory getServiceFactory()
throws ResourceException
ResourceException - Exception raised in failure situation
public IManagerFactory getManagerFactory()
throws ResourceException
ResourceException - Exception raised in failure situation
public IFilterFactory getFilterFactory()
throws ResourceException
ResourceException - Exception raised in failure situation
public IResourceContext getServiceContext()
throws ResourceException
ResourceException - on error
public IResourceContext getServiceContext(java.lang.String userID)
throws ResourceException
userID - the ID of the service user accountResourceException - on error
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||