|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.fc.idml.ItdiBook
public class ItdiBook
This wraps the functionality of an IDMLBook and enhances it with the additional functionality needed by the IdML Components.
Field Summary | |
---|---|
static String |
DELTA_TYPE_IDML
One of the two modes supported by the IdML schema - delta. |
static String |
REFRESH_TYPE_IDML
One of the two modes supported by the IdML schema - refresh. |
static int |
STORE_AS_FILE
Determines that the generated IdML documents will be stored as a file. |
Constructor Summary | |
---|---|
ItdiBook(String bookName)
Constructor. |
Method Summary | |
---|---|
String |
addConfigurationItem(String classType,
IdMLConstants.Operations operationType,
Entry entry)
Adds a Configuration Item (CI) to the IdML book. |
void |
addRelationship(String relationshipType,
IdMLConstants.Operations operationType,
Entry entry)
Adds a Relationship to the IdML book. |
void |
close()
Closes this IdML book. |
long |
getArtifactCount()
Returns the number of artifacts (CIs and Relationships) added to the IdML so far. |
String |
getContents()
Returns the contents of the OutputStream used for storing the IdML book. |
String |
getFileName()
Returns the full name of the IdML book. |
long |
getFileSize()
Returns the size of the IdML book. |
String |
getName()
Returns the name of the IdML book. |
boolean |
isInMemory()
Checks if this book is an in-memory IdML. |
boolean |
isOpened()
Checks if this book is already opened. |
boolean |
isRefreshMode()
Checks if this book uses REFRESH mode. |
boolean |
isValidateEnabled()
Checks if validation has been enabled for this book.. |
String |
open(String applicationCode,
String mssHostname,
String cdmVersion,
String id,
Entry entry)
Opens the IdML book. |
void |
reset()
Empties the contents of the buffer. |
void |
setDirectoryName(String directoryName)
Sets the name of the directory where the IdML book will be stored. |
void |
setName(String bookName)
Sets the name of the IdML book. |
void |
setRefresh(boolean refresh)
Sets the mode of this IdML book. |
void |
setStorageType(int storageType)
Sets the storage type of this IdML book. |
void |
setValidate(boolean validate)
Sets whether the generated IdML will be validated. |
String |
split()
Splits this IdML book. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DELTA_TYPE_IDML
public static final String REFRESH_TYPE_IDML
public static final int STORE_AS_FILE
Constructor Detail |
---|
public ItdiBook(String bookName)
bookName
- the name of this book.Method Detail |
---|
public long getArtifactCount()
public String getContents() throws UnsupportedEncodingException
UnsupportedEncodingException
- if a problem occurs.public String getFileName()
public long getFileSize()
public String getName()
public void setDirectoryName(String directoryName)
directoryName
- path to the folder where to store the IdML.public void setName(String bookName)
bookName
- the name to be used by this book.public void setRefresh(boolean refresh)
refresh
- if true the generated IdML will use REFRESH mode,
otherwise it will use DELTA mode.public void setStorageType(int storageType)
storageType
- STORE_AS_FILE
- the generated IdML will be stored as
a file, STORE_IN_MEMORY
- it will be kept in memory.public void setValidate(boolean validate)
validate
- if true a validation of the book will be performed
after its completion.public boolean isInMemory()
public boolean isOpened()
public boolean isRefreshMode()
public boolean isValidateEnabled()
public String open(String applicationCode, String mssHostname, String cdmVersion, String id, Entry entry) throws Exception
applicationCode
- the MSS's application code. It is used in the header of the
IdML document, when describing the MSS that contains the
artifacts described in this IdML.mssHostname
- the MSS's hostname. It is used in the header of the IdML
document, when describing the MSS that contains the artifacts
described in this IdML.cdmVersion
- the version of the Common Data Model used for defining the
artifacts in the IdML.id
- the id used for the MSS in the IdML document. If provided it
overrides the default value formed using the MSS's application
code and hostname.entry
- an Entry object containing the attributes for the MSS
Exception
- if a problem occurs.public String addConfigurationItem(String classType, IdMLConstants.Operations operationType, Entry entry) throws com.ibm.dl.production.IDMLInvalidOperationException, IOException
classType
- the class type of the configuration item. It is determined by
the Common Data Model.operationType
- the type of operation under which this item should be added.
This will determine what action should be performed with this
CI when the IdML book is later loaded to a CMDB. It can be
either created, modified or deleted.entry
- the TDI entry where the attributes needed for this CI are
stored.
com.ibm.dl.production.IDMLInvalidOperationException
- if a problem with the operation associated with this CI
occurs.
IOException
- if a problem occurs when trying to store the IdML data
(either in memory or to a file).public void addRelationship(String relationshipType, IdMLConstants.Operations operationType, Entry entry) throws Exception
relationshipType
- the type of the relationship. It is determined by the Common
Data Model.operationType
- the type of operation under which this relationship should be
added. This will determine what action should be performed
with this Relationship when the IdML book is later loaded to a
CMDB. It can be either created, modified or deleted.entry
- the TDI entry where the attributes needed for this
Relationship are stored.
com.ibm.dl.production.IDMLInvalidOperationException
- if a problem with the operation associated with this CI
occurs.
Exception
- if a problem occurs when trying to store the IdML data
(either in memory or to a file).public void close() throws Exception
Exception
- if a problem occurs.public void reset()
public String split() throws Exception
Exception
- if a problem occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |