java.lang.Object
com.flexstor.flexdbserver.services.asset.MoveAndChownService
- All Implemented Interfaces:
- com.flexstor.flexdbserver.services.Service
- public class MoveAndChownService
- extends java.lang.Object
- implements com.flexstor.flexdbserver.services.Service
MoveAndChownService
This service provides the functionality to move a file and then change the ownership
of that file.
Note: The majority of the code was copied from the ImportMoveService. Only
the changeTheOwner method is new.
Configurable Properties in services.config
None
Configurable Properties in roletype_services.config
In/Out Properties for Assets
| Attribute |
IN | OUT | Default IN | Default OUT |
| ROLE |   |   | ALL | ALL |
| Highres | X | X |   |   |
| Lowres | X | X |   |   |
| Thumbnail | X | X |   |   |
| Layout | X | X |   |   |
| Video | X | X |   |   |
| Audio | X | X |   |   |
| TYPE |
X | X | ALL | ALL |
| FLAG |
| PARENT | X | X | X | X |
| CHLDREN | X | X |   |   |
| ALL | X | X |   |   |
| TEMP_PARENT | X | X |   |   |
| TEMP_CHILDREN | X | X |   |   |
| TEMP_ALL | X | X |   |   |
Input Data Object
com.flexstor.common.importprocessor.ImportData
Output Data Object
com.flexstor.common.importprocessor.ImportResult
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDENTIFIER
public static final java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
context
protected com.flexstor.flexdbserver.services.ServiceContext context
id
protected int id
fileSeparator
protected java.lang.String fileSeparator
refImportData
protected com.flexstor.common.importprocessor.ImportData refImportData
refCtlData
protected com.flexstor.common.importprocessor.ImportCtlData refCtlData
sThisService
private java.lang.String sThisService
sServer
private java.lang.String sServer
bFromPreservice
private boolean bFromPreservice
MoveAndChownService
public MoveAndChownService()
setServiceContext
public void setServiceContext(com.flexstor.flexdbserver.services.ServiceContext context)
- Calls before the service is initialized (before initData is called) to
pass information about the environment in which the service is running.
This environment consists of information about the properties set for the
service in one of these files (services.config, roletype_services.config,
or *.ctl), plus methods to access other information such as an instance
of the service broker to invoke other services, the transaction id for
the service, file separator character and local path for the installation
directory and configuration directory.
- Specified by:
setServiceContext in interface com.flexstor.flexdbserver.services.Service
initData
public void initData(com.flexstor.common.data.ActionData actionData)
- A data initialization method called at the beginning of the service.
The input argument, ActionData must be cast into its subclass, ImportData
in order to extract the CopyService specific data from it.
- Specified by:
initData in interface com.flexstor.flexdbserver.services.Service
go
public com.flexstor.common.data.ActionResult go()
- The start of the Copy Service.
- Specified by:
go in interface com.flexstor.flexdbserver.services.Service
createOutputPath
private java.lang.String createOutputPath(java.lang.String sInputPath,
int nRoleId)
buildCompositeDir
protected java.lang.String buildCompositeDir(java.lang.String sLocation,
java.lang.String sRootPath,
java.lang.String sListBasePath)
- Build up the directory from the element & root paths specified.
getRoleId
private int getRoleId(java.lang.String sRole)
storeNewLocation
private void storeNewLocation(java.lang.String sOutputPath,
com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData assetOut,
com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData assetIn)
changeTheOwner
private void changeTheOwner(java.lang.String sFullPathToFile)