com.sapportals.wcm.service.resourceTypeRegistry

Interface IResourceTypeRegistryService

All Superinterfaces:
IService

public interface IResourceTypeRegistryService
extends IService

Provides a service to register properties such as language-dependent short descriptions or links to icons for resource types.


Field Summary
static String RESOURCETYPEREGISTRY_SERVICE
           
 
Method Summary
 IResourceType get(IResource resource)
          Deprecated. as of NW04. Renamed because of problems with overloading resolution, use getViaResource(IResource) instead.
 IResourceType get(String typeId)
          Returns the resource type with the specified identifier.
 IResourceType get(String typeId, boolean isCollection)
          Returns the resource type with the specified identifier, but limited to either plain resource or collection types, as opposed to get(String).
 IResourceType[] getResourceTypes()
          Returns all resource types, and an empty array if no resource types have been registered.
 IResourceType[] getResourceTypes(boolean isCollection)
          Returns either all plain resource or all collection types, depending on the value of the parameter isCollection, and an empty array if no such resource types have been registered.
 IResourceType getViaResource(IResource resource)
          Returns the resource type of the specified resource.
 IResourceType getViaResource(IResource resource, boolean resolveInternalLinks)
          Returns the resource type of the specified resource.
 
Methods inherited from interface com.sapportals.wcm.service.IService
getDescription, getDescription, getID
 

Field Detail

RESOURCETYPEREGISTRY_SERVICE

static final String RESOURCETYPEREGISTRY_SERVICE
See Also:
Constant Field Values
Method Detail

get

IResourceType get(String typeId)
Returns the resource type with the specified identifier. If the identifier is null or empty, the resource type configured as normal resource type is returned. If the identifier is unknown, IResourceType.UNKNOWN_RESOURCE_TYPE is returned. As opposed to get(String, boolean), it is not checked whether the specified resource type describes a plain resource or a collection.

Parameters:
typeId - Identifier of the resource type
Returns:
Resource type

get

IResourceType get(String typeId,
                  boolean isCollection)
Returns the resource type with the specified identifier, but limited to either plain resource or collection types, as opposed to get(String). That is, a call of IResourceType.isCollection() on the result is guaranteed to yield the value of the parameter isCollection. If the identifier is null or empty, the resource type configured as normal resource type or normal collection type is returned, depending on the value of the parameter isCollection. If the identifier, limited to either plain resource or collection types, is unknown, IResourceType.UNKNOWN_RESOURCE_TYPE or IResourceType.UNKNOWN_COLLECTION_TYPE is returned, depending on the value of the parameter isCollection.

Parameters:
typeId - Identifier of the resource type
isCollection - true iff a collection type is requested
Returns:
Resource type

get

IResourceType get(IResource resource)
Deprecated. as of NW04. Renamed because of problems with overloading resolution, use getViaResource(IResource) instead.

Returns the resource type of the specified resource. This method is equivalent to calling get(String, boolean) with resource.getResourceType() and resource.isCollection() as arguments.

Parameters:
resource - Resource
Returns:
Resource type

getViaResource

IResourceType getViaResource(IResource resource)
Returns the resource type of the specified resource. This method is equivalent to calling get(String, boolean) with resource.getResourceType() and resource.isCollection() as arguments.

Parameters:
resource - Resource
Returns:
Resource type

getViaResource

IResourceType getViaResource(IResource resource,
                             boolean resolveInternalLinks)
Returns the resource type of the specified resource. This method is equivalent get(IResource) but on demand resolves internal links before determining the resource type.

Parameters:
resource - Resource
resolveInternalLinks - true iff internal links are to be resolved before returning the resource type
Returns:
Resource type

getResourceTypes

IResourceType[] getResourceTypes()
Returns all resource types, and an empty array if no resource types have been registered.

Returns:
All resource types

getResourceTypes

IResourceType[] getResourceTypes(boolean isCollection)
Returns either all plain resource or all collection types, depending on the value of the parameter isCollection, and an empty array if no such resource types have been registered.

Parameters:
isCollection - true iff collections types are requested
Returns:
All plain resource or collection types, depending on the value of the parameter isCollection
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM


Copyright 2012 SAP AG Complete Copyright Notice