|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LocalResourceService
Provides methods to manage local resources.
Secured resources need an enterprise session. This session should be provided using
CmsSessionService
.
Method Summary | |
---|---|
void |
close(SlResource resource)
Releases the resource to avoid memory leak. |
void |
convertUniverse(java.lang.String sourceUnvFilePath,
java.lang.String destinationFolder,
java.lang.String newResourceName,
boolean isPromptConverted)
Converts a local .unv universe into a local .unx universe. |
CheckIntegrityRunner |
createCheckIntegrityRunner(java.lang.String resourcePath)
Creates a check integrity process. |
SlResource |
load(java.lang.String resourcePath)
Loads a resource that has been saved locally. |
java.lang.String |
publish(java.lang.String businessLayerPath,
java.lang.String destinationFolderPath,
boolean overwrite)
Publishes a local business layer to a local .unx universe. |
java.lang.String |
retrieve(java.lang.String universePath,
java.lang.String destinationFolderPath)
Retrieves the local business layer, data foundation and connection from a local .unx universe. |
IStatus |
save(SlResource resource,
java.lang.String localTargetPath,
boolean overwrite)
Saves a resource on the user machine. |
Method Detail |
---|
IStatus save(SlResource resource, java.lang.String localTargetPath, boolean overwrite) throws SlException
The method saves a resource object as a file on the user machine. The resource can be a business layer, a data foundation, or a connection.
When saving a data foundation or business layer, the number of values of each row of the static lists of values is compared to the number of columns:
resource
- The top level resource to be savedlocalTargetPath
- The file path where the resource will be saved locally, for example:
C:\BusinessLayers\myProject.blx
The resource file name must be specified and cannot be empty (C:\BusinessLayers\.blx
).
overwrite
- An exception is thrown if false
and the resource already exists on the user machine
IStatus
object that provides information on the save operation
success
SlException
- See SlException.getStatus()
and IStatus.getChildren()
to get further information
about error managementload(String)
SlResource load(java.lang.String resourcePath) throws SlException
The method loads in memory a resource persisted physically on the user machine. The resource can be a business
layer, a data foundation, or a connection. Every loaded resource must be released with the method
close(SlResource)
to avoid memory leak.
resourcePath
- The path of the local resource, for example C:\BusinessLayers\myProject.blx
SlException
save(SlResource, String, boolean)
void convertUniverse(java.lang.String sourceUnvFilePath, java.lang.String destinationFolder, java.lang.String newResourceName, boolean isPromptConverted) throws SlException
.unv
universe into a local .unx
universe.
sourceUnvFilePath
- The path of the .unv
file, for example C:\XIUniverses\eFashion.unv
destinationFolder
- The path of the converted universe stored locally, for example C:\XIUniverses\Conversion
newResourceName
- The name of the new resource, without extension
Is optional. If not provided, the universe name will be used. Can be null, but not empty.
isPromptConverted
- true
to create the parameter prompt in the business layer during conversion,
false
to keep the universe prompt definition into the business object
SlException
java.lang.String publish(java.lang.String businessLayerPath, java.lang.String destinationFolderPath, boolean overwrite) throws SlException
.unx
universe.
businessLayerPath
- The path of the business layer previously saved on disk, for example
C:\BusinessLayers\myProject.blx
destinationFolderPath
- The folder path of the published universe, for example C:\Universes\
overwrite
- An exception is thrown if false
and the resource already exists on the user machine
C:\Universes\myProject.unx
SlException
retrieve(String, String)
java.lang.String retrieve(java.lang.String universePath, java.lang.String destinationFolderPath) throws SlException
.unx
universe.
universePath
- The path of the universe previously saved on disk, for example C:\Universes\myProject.unx
destinationFolderPath
- The folder path of the resulting business layer, for example C:\
[specified destinationFolderPath]+[temporary folder name]+[top level file name]
.
For example: ["C:\"]+["retrieval-2012-09-21-21-58-14"]+["myProject.blx"]
.
SlException
publish(String, String, boolean)
void close(SlResource resource) throws SlException
If a method is still using this resource after it has been closed, an SlException
is raised.
The following methods also release this resource:
resource
- The resource to release
SlException
CheckIntegrityRunner createCheckIntegrityRunner(java.lang.String resourcePath)
resourcePath
- A String that represents the path of a resource (such as a connection, a data foundation, or a business layer) previously saved locally
CheckIntegrityRunner
object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |