java.lang.Object
com.flexstor.flexdbserver.services.asset.ImportDataCreateService
- All Implemented Interfaces:
- com.flexstor.flexdbserver.services.Service
- public class ImportDataCreateService
- extends java.lang.Object
- implements com.flexstor.flexdbserver.services.Service
ImportDataCreateService
Creates a fully structured ImportData (i.e. buckets, elments, assets ...)
object from the disquise (application)
named in the input control (*.ctl) file and the traversal path information from the
ActionData object passed in.
Input Data Object
com.flexstor.flexdbserver.services.asset.ActionData
Output Data Object
com.flexstor.common.data.ActionResult
|
Method Summary |
protected com.flexstor.common.data.ejb.disguiserecord.GenericBucketRecordData |
addObjectToStructure(com.flexstor.common.data.ejb.disguiserecord.DisguiseBucketRecordData refParentBucket,
com.flexstor.common.data.TraversalItem refTraversalItem)
|
private void |
constructAssetLevelStructure(com.flexstor.common.data.ejb.disguiserecord.DisguiseElementRecordData element,
com.flexstor.common.data.ejb.search.AssetTree elementNode)
Using the asset tree, recreate the asset level structure for the specified element, using empty
DisguiseAssetRecordData object. |
protected void |
getAndSaveServices(java.lang.String sService,
com.flexstor.common.importprocessor.ImportServices refServices,
com.flexstor.common.importprocessor.ImportCtlData refCtlData)
|
private com.flexstor.common.data.ejb.search.AssetTree |
getAssetsTree(java.util.Vector vRecords,
int nDisguiseId)
Get a tree reflecting the traversal path of each element in the traversal path of each asset
in the vRecords Vector. |
boolean |
getDisguise(int nDisguiseId)
|
private com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData |
getDisguiseAssetRecordData(long lAssetId,
com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData asset)
Parse through the asset looking for the DisguiseAssetRecordData object that matches the record
id passed in the argument. |
protected int |
getType(int nStructID)
|
com.flexstor.common.data.ActionResult |
go()
This methods carries the load of the business logic for the service. |
void |
initData(com.flexstor.common.data.ActionData refActionData)
A data initialization method called at the beginning of the service. |
java.lang.String |
initializeDebugGateway()
Initialize the Server Gateway |
protected void |
loadCtlInfo(com.flexstor.common.importprocessor.ImportData refImportData)
Load the .ctl data to the ImportData object. |
protected void |
loadGlobalProperties(com.flexstor.common.importprocessor.ImportData refImportData)
|
private void |
setAssetChildren(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData asset,
com.flexstor.common.data.ejb.search.AssetTree assetNode,
int nStructId)
Populates asset with its children |
protected void |
setAttributes(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData refAsset,
com.flexstor.common.data.AssetRecordData record,
java.lang.String sUserId)
|
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. |
protected void |
setServices(com.flexstor.common.importprocessor.ImportData refImportData,
com.flexstor.common.importprocessor.ImportCtlData refCtlData)
|
| 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
fileSeparator
private java.lang.String fileSeparator
id
private int id
refActionData
private com.flexstor.common.data.ActionData refActionData
sThisService
private java.lang.String sThisService
refDisguiseRecordData
protected com.flexstor.common.data.ejb.disguiserecord.DisguiseRecordData refDisguiseRecordData
refServerExtend
protected com.flexstor.ejb.disguise.persist.ServerDisguiseExtendData refServerExtend
refCtlData
protected com.flexstor.common.importprocessor.ImportCtlData refCtlData
bTest
protected boolean bTest
- TEST ONLY
ImportDataCreateService
public ImportDataCreateService()
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 refActionData)
- Description copied from interface:
com.flexstor.flexdbserver.services.Service
- A data initialization method called at the beginning of the service.
Not business logic, relevant to the functionality of the service, should be
added here, other than initializing some variables, etc.
- Specified by:
initData in interface com.flexstor.flexdbserver.services.Service
go
public com.flexstor.common.data.ActionResult go()
- Description copied from interface:
com.flexstor.flexdbserver.services.Service
- This methods carries the load of the business logic for the service.
- Specified by:
go in interface com.flexstor.flexdbserver.services.Service
addObjectToStructure
protected com.flexstor.common.data.ejb.disguiserecord.GenericBucketRecordData addObjectToStructure(com.flexstor.common.data.ejb.disguiserecord.DisguiseBucketRecordData refParentBucket,
com.flexstor.common.data.TraversalItem refTraversalItem)
loadCtlInfo
protected void loadCtlInfo(com.flexstor.common.importprocessor.ImportData refImportData)
- Load the .ctl data to the ImportData object.
getType
protected int getType(int nStructID)
loadGlobalProperties
protected void loadGlobalProperties(com.flexstor.common.importprocessor.ImportData refImportData)
setAttributes
protected void setAttributes(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData refAsset,
com.flexstor.common.data.AssetRecordData record,
java.lang.String sUserId)
setServices
protected void setServices(com.flexstor.common.importprocessor.ImportData refImportData,
com.flexstor.common.importprocessor.ImportCtlData refCtlData)
getAndSaveServices
protected void getAndSaveServices(java.lang.String sService,
com.flexstor.common.importprocessor.ImportServices refServices,
com.flexstor.common.importprocessor.ImportCtlData refCtlData)
getDisguise
public boolean getDisguise(int nDisguiseId)
initializeDebugGateway
public java.lang.String initializeDebugGateway()
- Initialize the Server Gateway
getAssetsTree
private com.flexstor.common.data.ejb.search.AssetTree getAssetsTree(java.util.Vector vRecords,
int nDisguiseId)
- Get a tree reflecting the traversal path of each element in the traversal path of each asset
in the vRecords Vector. This traversal path only includes assets; it start at the element level
and works its way down to the last child asset in the structure.
constructAssetLevelStructure
private void constructAssetLevelStructure(com.flexstor.common.data.ejb.disguiserecord.DisguiseElementRecordData element,
com.flexstor.common.data.ejb.search.AssetTree elementNode)
- Using the asset tree, recreate the asset level structure for the specified element, using empty
DisguiseAssetRecordData object.
setAssetChildren
private void setAssetChildren(com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData asset,
com.flexstor.common.data.ejb.search.AssetTree assetNode,
int nStructId)
- Populates asset with its children
getDisguiseAssetRecordData
private com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData getDisguiseAssetRecordData(long lAssetId,
com.flexstor.common.data.ejb.disguiserecord.DisguiseAssetRecordData asset)
- Parse through the asset looking for the DisguiseAssetRecordData object that matches the record
id passed in the argument. This method should be called after calling the
constructAssetLevelStructure method.