|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for factory data service resources that can create and remove data service resources dynamically.
Method Summary | |
java.lang.String |
createResource(java.lang.String namePrefix,
DataResourceAccessor dataResourceAccessor,
ActivitiesConfig activitiesConfig,
SessionComponentFactory sessionComponentFactory)
Cteates a data service resource using the given details. |
void |
createResource(java.lang.String resourceName,
java.lang.String dataResourceAccessorClassName)
Creates a new data service resource. |
java.lang.String |
getNewResourceName()
Returns a new resource name that is guaranteed to be unique within the host service. |
java.lang.String |
getNewResourceName(java.lang.String prefix)
Returns a new resource name that is guaranteed to be unique within the host service. |
java.io.File |
getResourceConfigDirectory(java.lang.String resourceName)
Returns the configuration files directory for the named resource. |
void |
removeResource(java.lang.String resourceName,
boolean removeConfiguration)
Withdraw a data service resource from a service. |
Method Detail |
public java.lang.String createResource(java.lang.String namePrefix, DataResourceAccessor dataResourceAccessor, ActivitiesConfig activitiesConfig, SessionComponentFactory sessionComponentFactory) throws ResourceCreationException
namePrefix
- A perfix to use for the name of the data service resource.
The name will begin with this prefix and will end with a
sequence of character such that it is unique.dataResourceAccessor
- Data resource accessor used to access any underlying data
resource. If there is no actual data resource then use
an instance of
uk.org.ogsadai.dataresource.NullDataResourceAccessor
.activitiesConfig
- Details of which activities can be used with this data
service resource.sessionComponentFactory
- Factory used to creation the session componets to be used
by the data service resource.
ResourceCreationException
- if the resource cannot be created.public java.lang.String getNewResourceName()
public java.lang.String getNewResourceName(java.lang.String prefix)
prefix
- for the resource name.
public java.io.File getResourceConfigDirectory(java.lang.String resourceName) throws DynamicDataServiceResourceCreationException
resourceName
- Name of the resource to create the directory for.
DynamicDataServiceResourceCreationException
- if an error
occurs during the creation.public void createResource(java.lang.String resourceName, java.lang.String dataResourceAccessorClassName) throws DynamicDataServiceResourceCreationException
If it does not already exist then a configuration files directory will be created. The data resource accessor class configuration file will be written to the configuration directory.
resourceName
- Name of the data service resource to create.dataResourceAccessorClassName
- Name of the data resource accessor class to be associated
with the new data service resource.
DynamicDataServiceResourceCreationException
- if an error
occurs during the creation.public void removeResource(java.lang.String resourceName, boolean removeConfiguration) throws DynamicDataServiceResourceRemovalException
resourceName
- name of the data service resource to withdrawremoveConfiguration
- indicates whether to remove the resource
configuration files
DynamicDataServiceResourceRemovalException
- if an error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |