public class ResourceService extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
| Constructor and Description |
|---|
ResourceService() |
| Modifier and Type | Method and Description |
|---|---|
Resource |
getResource(String resourceId)
Gets the resource for the given resource id
|
Resource |
getResource(String protocolId,
String endpointId,
String objectId)
Gets a resource for the given protocol, endpoint and object id
|
ResourceContent |
getResourceContent(String resourceId)
Retrieves the content payload for the described resource
|
ResourceContent |
getResourceContent(String protocolId,
String endpointId,
String objectId)
Retrieves the content payload for the described resource
|
String[] |
getResourceDescriptorIds(String resourceId)
Returns an array of the constituent parts of a resource id -
the protocol id, the endpoint id and the object id.
|
ResourceLoader |
getResourceLoader(String protocolId,
String endpointId)
Returns an appropriate resource loader for the given
protocol and endpoint
|
ResourceLoaderFactory |
getResourceLoaderFactory(String protocolId)
Returns a resource loader factory for the given protocol
|
ResourceContent |
getResourceMetadata(String resourceId)
Retrieves the metadata payload for the described resource
|
ResourceContent |
getResourceMetadata(String protocolId,
String endpointId,
String objectId) |
WebFrameworkServiceRegistry |
getServiceRegistry()
Gets the service registry.
|
WebFrameworkConfigElement |
getWebFrameworkConfiguration()
Gets the web framework configuration.
|
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
protected void |
onBootstrap()
Initialization of Resource Service
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setServiceRegistry(WebFrameworkServiceRegistry webFrameworkServiceRegistry)
Sets the service registry.
|
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setServiceRegistry(WebFrameworkServiceRegistry webFrameworkServiceRegistry)
webFrameworkServiceRegistry - the new service registrypublic WebFrameworkServiceRegistry getServiceRegistry()
public WebFrameworkConfigElement getWebFrameworkConfiguration()
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListenerprotected void onBootstrap()
public Resource getResource(String resourceId) throws ResourceLoaderException
resourceId - the resource idResourceLoaderException - the resource loader exceptionpublic Resource getResource(String protocolId, String endpointId, String objectId) throws ResourceLoaderException
protocolId - StringendpointId - StringobjectId - StringResourceLoaderExceptionpublic ResourceLoader getResourceLoader(String protocolId, String endpointId)
protocolId - StringendpointId - Stringpublic ResourceLoaderFactory getResourceLoaderFactory(String protocolId)
protocolId - Stringpublic ResourceContent getResourceContent(String resourceId) throws IOException, ResourceLoaderException
resourceId - StringResourceLoaderExceptionIOExceptionpublic ResourceContent getResourceContent(String protocolId, String endpointId, String objectId) throws IOException, ResourceLoaderException
protocolId - StringobjectId - StringendpointId - StringResourceLoaderExceptionIOExceptionpublic ResourceContent getResourceMetadata(String resourceId) throws IOException, ResourceLoaderException
resourceId - StringResourceLoaderExceptionIOExceptionpublic ResourceContent getResourceMetadata(String protocolId, String endpointId, String objectId) throws IOException, ResourceLoaderException
IOExceptionResourceLoaderExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.