IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.ras.impord.log
Interface IImportLog


public interface IImportLog

Interface to help record actions performed on RAS Asset, Artifact, and Activity into an XML file. Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability.


Field Summary
static String ACTIVITY
          Constant for tagging an Activity in the XML file
static String ARTIFACT
          Constant for tagging an Artifact node in the XML file
static String ASSET
          Constant for tagging an Asset node in the XML file
static String DATE
          Constant to denote a date attribute
static String DESCRIPTION
          Constant to denote description attribute
static String FEATURE
          Tag to denote that te artifact was extracted as a feature
static String FILE
          Constant for tagging artifact types based on the type of extraction.
static String FOLDER
          Tag to denote that the artifact was extracted as a folder
static String ID
          Constant to denote an id attribute
static String IMPORTED_TO
          Constant to denote the target location the resource was imported to
static String NAME
          Constant to denote a name attribute
static String PLUGIN
          Tag to denote that the artifact was extracted as a plugin
static String PROJECT
          Tag to denote that the the artifact was extracted as a project
static String RELATED_ASSET
          Constant for tagging an RelatedAsset node in the XML file
static String RELATIONSHIP_TYPE
          Constant to denote a relationship type attribute
static String ROLE
          Constant to denote role attribute
static String SHORT_DESCRIPTION
          Constant to denote short description attribute
static String STATUS
          Constant to denote the main node in the Status Log Document
static String TASK
          Constant to denote task attribute
static String TASK_TYPE
          Constant to denote task type attribute
static String TOKEN
          Token used to construct log filename.
static String TYPE
          Constant to denote a type attribute
static String VERSION
          Constant to denote a version attribute
 
Method Summary
 Element createElement(Node parent, String type, Map attributes)
          Create an Element node tagged with type under a given parent node.
 String getAssetDate()
          getter to retrieve the date on the asset
 String getAssetID()
          getter to retrieve the id of the asset.
 String getAssetName()
          getter to retrieve the name of the asset.
 String getAssetShortDescription()
          getter to retrieve the short description for the asset.
 String getAssetVersion()
          getter to retrieve the version of the asset.
 Date getImportDate()
          getter to retrieve the date of importing the asset.
 File getImportLogFile()
          Retrieve the serialized file that contains the log of the actions performed on the asset
 Element log(Activity activity)
          Record the processing of the Activity as a separate XML Element in the XML file.
 Element log(Artifact artifact, String type, String targetLocation)
          Record the import of the Artifact as a separate XML Element tagged with the artifact type.
 Element log(Asset asset)
          Record the import of the Asset as a separate XML Element in the XML file
 Element log(RelatedAsset relatedAsset)
          Record the import of the RelatedAsset as a separate XML Element in the XML file
 IStatus writeLog()
          The XML file is serialized and persisted on the filesystem.
 

Field Detail

STATUS

public static final String STATUS
Constant to denote the main node in the Status Log Document

See Also:
Constant Field Values

ASSET

public static final String ASSET
Constant for tagging an Asset node in the XML file

See Also:
Constant Field Values

RELATED_ASSET

public static final String RELATED_ASSET
Constant for tagging an RelatedAsset node in the XML file

See Also:
Constant Field Values

ARTIFACT

public static final String ARTIFACT
Constant for tagging an Artifact node in the XML file

See Also:
Constant Field Values

ACTIVITY

public static final String ACTIVITY
Constant for tagging an Activity in the XML file

See Also:
Constant Field Values

FILE

public static final String FILE
Constant for tagging artifact types based on the type of extraction. This tag denotes that the artifact was extracted as a file

See Also:
Constant Field Values

FOLDER

public static final String FOLDER
Tag to denote that the artifact was extracted as a folder

See Also:
Constant Field Values

PROJECT

public static final String PROJECT
Tag to denote that the the artifact was extracted as a project

See Also:
Constant Field Values

PLUGIN

public static final String PLUGIN
Tag to denote that the artifact was extracted as a plugin

See Also:
Constant Field Values

FEATURE

public static final String FEATURE
Tag to denote that te artifact was extracted as a feature

See Also:
Constant Field Values

TOKEN

public static final String TOKEN
Token used to construct log filename. The number between the tokens reflects the date the log file was created on.

See Also:
Constant Field Values

NAME

public static final String NAME
Constant to denote a name attribute

See Also:
Constant Field Values

ID

public static final String ID
Constant to denote an id attribute

See Also:
Constant Field Values

TYPE

public static final String TYPE
Constant to denote a type attribute

See Also:
Constant Field Values

VERSION

public static final String VERSION
Constant to denote a version attribute

See Also:
Constant Field Values

DATE

public static final String DATE
Constant to denote a date attribute

See Also:
Constant Field Values

RELATIONSHIP_TYPE

public static final String RELATIONSHIP_TYPE
Constant to denote a relationship type attribute

See Also:
Constant Field Values

SHORT_DESCRIPTION

public static final String SHORT_DESCRIPTION
Constant to denote short description attribute

See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
Constant to denote description attribute

See Also:
Constant Field Values

IMPORTED_TO

public static final String IMPORTED_TO
Constant to denote the target location the resource was imported to

See Also:
Constant Field Values

TASK

public static final String TASK
Constant to denote task attribute

See Also:
Constant Field Values

TASK_TYPE

public static final String TASK_TYPE
Constant to denote task type attribute

See Also:
Constant Field Values

ROLE

public static final String ROLE
Constant to denote role attribute

See Also:
Constant Field Values
Method Detail

createElement

public Element createElement(Node parent,
                             String type,
                             Map attributes)
Create an Element node tagged with type under a given parent node.

Parameters:
parent - is the given parent node which is usually the Document itself or another Element.
type - is the type that the created element is tagged as
attributes - is a map of all attributes that is to be set for the created element.
Returns:
Element appended as a child to the given parent and tagged with the given type.

log

public Element log(Asset asset)
Record the import of the Asset as a separate XML Element in the XML file

Parameters:
asset - is the asset whose attributes(name, id, version, etc.) will be set for the XML element.
Returns:
Element that represents the Asset node.

log

public Element log(RelatedAsset relatedAsset)
Record the import of the RelatedAsset as a separate XML Element in the XML file

Parameters:
relatedAsset - is the asset whose attributes(name, id, relationship type, etc.) will be set for the XML element.
Returns:
Element that represents the Related Asset node.

log

public Element log(Artifact artifact,
                   String type,
                   String targetLocation)
Record the import of the Artifact as a separate XML Element tagged with the artifact type.

Parameters:
artifact - is the artifact whose attributes(name, version, etc.) will be set for the XML element.
type - denotes how the artifact was extracted. Suggested types are listed as constants IImportActionStatus.FILE, IImportActionStatus.FOLDER, IImportActionStatus.PROJECT and IImportActionStatus.PLUGIN.
targetLocation - is set as the last attribute for the XML element.
Returns:
Element that represents the Artifact node.

log

public Element log(Activity activity)
Record the processing of the Activity as a separate XML Element in the XML file.

Parameters:
activity - us the activity whose attributes(task name, type, role, description, etc.) will be set for the XML element.
Returns:
Element that represents the Activity node.

writeLog

public IStatus writeLog()
The XML file is serialized and persisted on the filesystem.

Returns:
staus of the writeLog operation.

getImportLogFile

public File getImportLogFile()
Retrieve the serialized file that contains the log of the actions performed on the asset

Returns:
the status log file.

getImportDate

public Date getImportDate()
getter to retrieve the date of importing the asset.

Returns:
Returns the importDate.

getAssetName

public String getAssetName()
getter to retrieve the name of the asset.

Returns:
Returns the assetName.

getAssetDate

public String getAssetDate()
getter to retrieve the date on the asset

Returns:
Returns the assetDate.

getAssetID

public String getAssetID()
getter to retrieve the id of the asset.

Returns:
Returns the assetID.

getAssetVersion

public String getAssetVersion()
getter to retrieve the version of the asset.

Returns:
Returns the assetVersion.

getAssetShortDescription

public String getAssetShortDescription()
getter to retrieve the short description for the asset.

Returns:
Returns the assetShortDescription.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.