com.sap.portal.resource.repository

Interface IResourceRepositoryService


public interface IResourceRepositoryService

Provides access to the resources in the portal resource repository


Field Summary
static String KEY
          Service key
static String REPOSITORY_ROOT_PCD_ID
          PCD ID of the portal resource repository root
 
Method Summary
 IResource getResource(String resourcePath, String resourceType, boolean timeStampRequired)
          Retrieves an IResource object containing the metadata of a resource located in the specified resource repository path.
 URI getResourceURI(String resourcePath)
          Retrieves a resource's URI from the resource repository according to its repository path.
 URI getResourceURI(String resourcePath, boolean timeStampRequired)
          Retrieves a resource's URI from the resource repository according to its repository path, and a boolean indicating if the last modification timestamp is required.
 

Field Detail

KEY

static final String KEY
Service key

See Also:
Constant Field Values

REPOSITORY_ROOT_PCD_ID

static final String REPOSITORY_ROOT_PCD_ID
PCD ID of the portal resource repository root

See Also:
Constant Field Values
Method Detail

getResourceURI

URI getResourceURI(String resourcePath)
                   throws URISyntaxException,
                          InvalidResourcePathException
Retrieves a resource's URI from the resource repository according to its repository path. Does not verify if the resource exists;.if not, a meaningless URI is returned.

Parameters:
resourcePath - the full or relative path to the resource, such as "\Folder1\Folder2\home.jpg" or "pcd:resource_repository\Folder1\Folder2\home.jpg"
Returns:
The URI of the resource
Throws:
URISyntaxException - if the specified resource path could not be resolved into a valid URI
InvalidResourcePathException - if the specified resource path is invalid

getResourceURI

URI getResourceURI(String resourcePath,
                   boolean timeStampRequired)
                   throws ResourceNotFoundException,
                          URISyntaxException,
                          InvalidResourcePathException
Retrieves a resource's URI from the resource repository according to its repository path, and a boolean indicating if the last modification timestamp is required.

Parameters:
resourcePath - the full or relative path to the resource, such as "\Folder1\Folder2\home.jpg" or "pcd:resource_repository\Folder1\Folder2\home.jpg"
timeStampRequired - indicates if the last modification timestamp should be retrieved. If true, the returned URI includes the resource's last modification timestamp (note that retrieval with a timestamp might impact performance, because the resource itself is retrieved). If the timestamp is not required, use getResourceURI(String)
Returns:
The URI of the resource with the last modification timestamp
Throws:
ResourceNotFoundException - occurs only if timeStampRequired is true, on failure to retrieve the resource from the repository
URISyntaxException - if the specified resource path could not be resolved into a valid URI
InvalidResourcePathException - if the specified resource path is invalid

getResource

IResource getResource(String resourcePath,
                      String resourceType,
                      boolean timeStampRequired)
                      throws ResourceNotFoundException,
                             InvalidResourcePathException
Retrieves an IResource object containing the metadata of a resource located in the specified resource repository path.

Parameters:
resourcePath - the full or relative path to the resource, such as "\Folder1\Folder2\home.jpg" or "pcd:resource_repository\Folder1\Folder2\home.jpg"
resourceType - the resource type, such as IResource.CSS
timeStampRequired - indicates if the last modification timestamp should be retrieved; if true, the actual resource is retrieved from the repository, which may impact performance.
Returns:
An IResource object
Throws:
ResourceNotFoundException - occurs only if timeStampRequired is true, on failure to retrieve the resource from the repository.
InvalidResourcePathException - if the specified resource path is empty
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS [sap.com] tc/epbc/resourcerepository/api api EP-PIN


Copyright 2015 SAP AG Complete Copyright Notice