|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.ixb.archive.ArchiveHndHelper
This class holds String constants and helper methods which IX handlers need to support Archive and Restore functionality.
Constructor Summary | |
ArchiveHndHelper()
|
Method Summary | |
static void |
addOidForReuse(Transaction transaction,
ObjectIdentifier oid)
Adds an oid to transaction map for restore |
static void |
archiveCreateRecord(Object o,
IxbElement fileXml,
Exporter exporter)
Archives the createRecord to xml. |
static void |
archiveFlexibleVersioningInfo(Object o,
IxbElement fileXml,
Exporter exporter)
Archives the flexibleVersioningInfo to xml. |
static Object |
findAmongExistingObjectsForRestore(IxbElement fileXml,
Importer importer)
Implements a standard way to find from existing windchill database an object that matches the IxbHndHelper.XML_ATTR_LOCAL_ID element in the
archived xml file. |
private static String |
getXmlElementValue(IxbElement fileXml,
String xmlTag)
Obtains xml element value. |
private static String |
getXmlElementValue(IxbElement fileXml,
String xmlTag,
boolean isElementOptional)
Obtains xml element value. |
private static boolean |
isADn(String user)
|
static Object |
restoreCreateRecord(Object o,
IxbElement fileXml,
Importer importer)
Restores the createRecord and object id from xml. |
static Object |
restoreObjectId(Object o,
IxbElement fileXml,
Importer importer)
Restores object id from xml file. |
static Ufid |
stringToUfid(String ufidString)
Converts string to ufid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String XML_ARCHIVE_INFO
public static final String XML_ATTR_LOCAL_ID
public static final String XML_ATTR_CONTAINER_ID
public static final String XML_ATTR_FOLDER_ID
public static final String XML_CREATE_RECORD
public static final String XML_ATTR_CREATE_STAMP
public static final String XML_ATTR_MODIFY_STAMP
public static final String XML_ATTR_CREATED_BY_DNADDR
public static final String XML_ATTR_CREATED_BY_OIDADDR
public static final String XML_ATTR_MODIFIED_BY_DNADDR
public static final String XML_ATTR_MODIFIED_BY_OIDADDR
public static final String XML_ATTR_OWNED_BY_DNADDR
public static final String XML_ATTR_OWNED_BY_OIDADDR
public static final String XML_FLEXIBLE_VERSIONING_INFO
public static final String XML_PREDECCESOR_BRANCH_POINT_UFID
public static final String XML_MERGE_INWARDS_UFID
public static final String XML_MERGE_OUTWARDS_UFID
public static final String XML_OBJECT_HISTORY
public static final String XML_LC_HISTORY
public static final String XML_LC_ACTION
public static final String XML_LC_ACTOR_NAME
public static final String XML_LC_NAME
public static final String XML_LC_PHASE_NAME
public static final String XML_LC_STATE
public static final String XML_LC_TEAM_ID
public static final String XML_LC_HISTORY_CREATEDATE
public static final String XML_LC_HISTORY_MODIFYDATE
public static final String XML_LC_SIGNATURE
public static final String XML_LC_COMMENTS
public static final String XML_LC_SIGNATURE_PHASE
public static final String XML_LC_ROLE_NAME
public static final String XML_LC_SIGNER_NAME
public static final String XML_LC_SIGNER
public static final String XML_LC_VOTE
public static final String XML_LC_SIGNATURE_CREATEDDATE
public static final String XML_LC_SIGNATURE_MODIFYDATE
public static final String XML_LC_CRITERION
public static final String XML_LC_ASSERTION
public static final String XML_LC_SATISFIED
public static final String XML_LC_CRITERION_CREATEDDATE
public static final String XML_LC_CRITERION_MODIFYDATE
public static final String XML_TAG_RELATIONSHIP_MAP
public static final String XML_TAG_BASE_CRITERION_DEF
public static final String XML_TAG_COLLECTION_CRITERIA
public static final String XML_TAG_CRITERION_DEF_VALID_WITH
public static final String XML_TAG_RELATIONSHIP_MAP_DEF
public static final int IMPORT_PRIORITY_COLLECTION_UNITS
private static final String RESOURCE
private static final ReferenceFactory RF
Constructor Detail |
public ArchiveHndHelper()
Method Detail |
public static final void archiveCreateRecord(Object o, IxbElement fileXml, Exporter exporter) throws WTException
Archives the createRecord to xml.
The context object must be Iterated and Ownable.
o
- the context objectfileXml
- the xmlexporter
- the exporter
WTException
public static final Object restoreCreateRecord(Object o, IxbElement fileXml, Importer importer) throws WTException
Restores the createRecord and object id from xml.
This method must be called before the object is persisted. The context object must be Iterated and Ownable.
o
- the context objectfileXml
- the xmlimporter
- the importer
WTException
public static final Object restoreObjectId(Object o, IxbElement fileXml, Importer importer) throws WTException
Restores object id from xml file.
For object classes that have archived createRecord
in xml file
(mainly business classes such as EPMDocument, WTPart, WTDocument),
it is not necessary to call this method, because it has already
been called from within restoreCreateRecord
method.
This method must be called before the object is persisted, exception will be thrown otherwise. The context object must be Persistable.
o
- the context objectfileXml
- the xmlimporter
- the importer
WTException
public static final Object findAmongExistingObjectsForRestore(IxbElement fileXml, Importer importer) throws WTException
IxbHndHelper.XML_ATTR_LOCAL_ID
element in the
archived xml file.
The assumption is that it runs on the same system where the xml backup was made. This method should not be used in export/import context.
.
fileXml
- importer
-
WTException
public static final void archiveFlexibleVersioningInfo(Object o, IxbElement fileXml, Exporter exporter) throws WTException
Archives the flexibleVersioningInfo to xml.
The context object must be Iterated and Federatable.
o
- the context objectfileXml
- the xmlexporter
- the exporter
WTException
public static Ufid stringToUfid(String ufidString) throws WTException
WTException
public static void addOidForReuse(Transaction transaction, ObjectIdentifier oid) throws WTException
oid
- the object identifier to be reused
WTException
private static String getXmlElementValue(IxbElement fileXml, String xmlTag, boolean isElementOptional) throws WTException
fileXml
- the XMLxmlTag
- the tag name of the xml element
WTException
- if the xml element cannot be found and it is not optionalprivate static boolean isADn(String user)
private static String getXmlElementValue(IxbElement fileXml, String xmlTag) throws WTException
fileXml
- xmlTag
-
WTException
- if the xml element cannot be found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |