public interface LocalResourceService
Secured resources need an enterprise session. This session should be provided using
CmsSessionService.
| Modifier and Type | Method and Description |
|---|---|
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)
Deprecated.
|
IStatus |
convertUniverse(java.lang.String sourceUnvFilePath,
java.lang.String destinationFolder,
java.lang.String newResourceName,
ConversionOptions options)
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. |
void |
repairBusinessLayer(java.lang.String businessLayerPath)
Repairs the business layer when some internal references between a business object and its tables have been lost.
|
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.
|
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 machineIStatus object that provides information on the save operation
successSlException - 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.blxSlExceptionsave(SlResource, String, boolean)@Deprecated
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.unvdestinationFolder - The path of the converted universe stored locally, for example C:\XIUniverses\ConversionnewResourceName - 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 objectSlExceptionIStatus convertUniverse(java.lang.String sourceUnvFilePath, java.lang.String destinationFolder, java.lang.String newResourceName, ConversionOptions options)
.unv universe into a local .unx universe.sourceUnvFilePath - The path of the .unv file, for example C:\XIUniverses\eFashion.unvdestinationFolder - The path of the converted universe stored locally, for example C:\XIUniverses\ConversionnewResourceName - 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.
options - The conversion options.IStatus object containing the status of the conversion.ConversionOptionsjava.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.blxdestinationFolderPath - 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 machineC:\Universes\myProject.unxSlExceptionretrieve(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.unxdestinationFolderPath - 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"].SlExceptionpublish(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 releaseSlExceptionCheckIntegrityRunner 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 locallyCheckIntegrityRunner objectvoid repairBusinessLayer(java.lang.String businessLayerPath)
throws SlException
businessLayerPath - The path of the businessLayer to repair.SlException