|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.sdk.common.dkAbstractAttrDef | +--com.ibm.mm.sdk.common.DKAttrDefICM
This class is used to represent attribute definition in Content Manager Server. It has basic properties, such as, name, description, nullability, text-searchability, and so forth. Persistent operations on attribute definition are also supported via add, update, and delete methods. Attributes in Content Manager are created as independent objects and have generic properties. When creating an item-type, the user decides which attributes to include into this item-type. Once an attribute is included in an item-type, it can have specific properties for this particular item-type. For example, the attribute ISBN under item-type Journal is set to nullable, but under item-type Book, it is non-nullable. Such specific properties includes nullable, readable, writable, text-searchable, Uniqueness, RM attribute, excludeRow, representative property, etc. See DKItemTypeDefICM for the definition of the item-type, and DKItemTypeViewDefICM for the definition of item-type view. Attriubtes can be used to compose attribute groups. See DKAttrGroupDefICM for the definition of the attribute group.
Field Summary | |
short |
_groupSeqNo
|
static short |
DK_ATTR_TYPE_DEFAULT_DECIMAL
|
static short |
DK_ATTR_TYPE_DEFAULT_FLOAT
|
static short |
DK_ATTR_TYPE_DEFAULT_HEXSTRING
|
static short |
DK_ATTR_TYPE_DEFAULT_INTEGER
|
static short |
DK_ATTR_TYPE_DEFAULT_OTHER
|
static short |
DK_ATTR_TYPE_DEFAULT_STRING
|
static short |
DK_ATTR_TYPE_DEFAULT_UNDEFINED
|
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId |
For details, see the class or interface |
Constructor Summary | |
DKAttrDefICM()
Constructs an attribute definition for ICM datastore |
|
DKAttrDefICM(DKAttrDefICM attr)
A copy constructor for attribute definition for ICM datastore |
|
DKAttrDefICM(dkDatastore ds)
Constructs an attribute definition for the given ICM datastore |
Method Summary | |
void |
add()
Adds this attribute definition to the persistent store |
void |
del()
Deletes this attribute definition from the persistent store. |
short |
getAttrFlag()
Gets the attribute flag information for this attribute |
java.lang.String |
getAttrGroupMemberName()
Gets the attribute name only. |
java.lang.String |
getAttrGroupName()
Gets group name in which this attribute belongs to |
short |
getAttrViewFlag()
Gets the attribute view flag information. |
int |
getComponentViewId()
Gets the component type view identifier to which this attribute belongs This methods is only applicable if this attribute is a part of a component type view. |
short |
getDefaultType()
Gets the default type for this attribute. |
java.lang.String |
getDefaultValue()
Gets the default value for this attribute. |
java.lang.String |
getDescription(java.lang.String langCode)
Gets the attribute description in the given language |
int |
getEntityId()
Returns the identifier of the item type in which this attribute belongs |
int |
getGroupId()
Get the group identifier for this attribute Returns zero, if this attribute is not part of an attribute group. |
int |
getGroupMemberId()
Gets the attribute identifier. |
short |
getIndexOrder()
Gets the index order information for this attribute The valid values are: DKConstantICM.DK_ICM_INDEX_FLAG_ASCENDING: Gets attribute index in ascending order DKConstantICM.DK_ICM_INDEX_FLAG_DESCENDING: Gets attribute index in desceding order |
int |
getIntId()
Gets the integer identifier for this attribute. |
java.lang.String |
getName()
Gets the attribute name or its composite name. |
java.lang.String |
getQualifiedName()
Gets the qualified name of this attribute. |
int |
getStringType()
Gets the string type value for this attribute override getStringType in class dkAbstractAttrDef |
DKTextIndexDefICM |
getTextIndexDef()
Gets the text search index definition for this attribute. |
int |
getUserFlag()
Gets the user flag The returned value will be one of the following: DK_CM_ATTR_ALPHA: The string contains alphabetic characters only DK_CM_ATTR_ALPHANUM: The string contains alpha-numeric characters DK_CM_ATTR_ALPHANUM_EXT: The string contains alpha-numeric and other special characters DK_CM_ATTR_NUMERIC: The string only contains numeric characters DK_CM_ATTR_OTHER: The string may follows application defined rules and the interpretation is left to the application |
java.lang.String |
getViewCompareValue()
Gets the compare value associated with the view operator for the component view where this attribute belongs. |
short |
getViewOperator()
Gets the view operator for the component view where this attribute belongs. |
short |
getViewSequenceNo()
Gets the position number of this attribute in this component view This helps user application display attributes in order of perference. |
boolean |
isExcludeRow()
Returns true if this attribute is used in an expression to filter unwanted component instances in component type view definition. |
boolean |
isNullable()
Checks if this attribute is nullable. |
boolean |
isReadable()
Returns true if this attribute is readable. |
boolean |
isRepresentative()
Returns true if this attribute is a representative attribute for this item-type. |
boolean |
isRMAttr()
Checks if this attribute is a resource manager attribute. |
boolean |
isTextSearchable()
Returns true if this attribute is text searchable. |
boolean |
isUnique()
Returns true if this attribute value is always unique in this item-type. |
boolean |
isWriteable()
Returns true if this attribute is writeable. |
java.lang.String[] |
parseQualifiedName()
Parses the qualified name of this attribute into an array of its parts. |
java.lang.String[] |
parseQualifiedName(java.lang.String qualifiedName)
Parses the given qualified name into an array of its parts For example, a qualified name "chapter/section/SectionName" parses to a string array {"chapter", "section", "SectionName"}. |
void |
setAttrFlag(short attrFlag)
Sets attribute flag information for this attribute |
void |
setAttrGroupMemberName(java.lang.String attrGroupMemName)
Sets the attribute name only. |
void |
setAttrGroupName(java.lang.String attrGroupName)
Sets group name in which this attribute belongs to |
void |
setAttrViewFlag(short attrViewFlag)
Sets the attribute view flag to the given bit conbinations. |
void |
setComponentViewId(int compViewId)
Sets the component view identifier to which this attribute belongs |
void |
setDefaultType(short defaultType)
Sets the default type for this attribute. |
void |
setDefaultValue(java.lang.String defaultValue)
Sets the default value for this attribute. |
void |
setDescription(java.lang.String desc,
java.lang.String langCode)
Sets the attribute description for the given language. |
void |
setExcludeRow(boolean isExcludeRow)
Sets the excludeRow property of this attribute to true or false. |
void |
setIndexOrder(short indexOrder)
Sets the index order information for this attribute |
void |
setName(java.lang.String attrName)
Sets the attribute name or its composite name. |
void |
setNullable(boolean nullable)
Sets the nullability property of this attribute. |
void |
setQualifiedName(java.lang.String fullQualifyName)
Sets the qualified name for this attribute. |
void |
setReadable(boolean readable)
Sets the readable property of this attribute to true or false. |
void |
setRepresentative(boolean isRepresentative)
Set the representative property of this attribute to true or false. |
void |
setRMAttr(boolean rmAttr)
Sets the resource manager property of this attribute to a boolean value true or false. |
void |
setStringType(int stringType)
Sets the string type value for this attribute |
void |
setTextIndexDef(DKTextIndexDefICM textIndexDef)
Sets the text search index definition for this attribute. |
void |
setTextSearchable(boolean textSearchable)
Makes this attribute text searchable or non-text searchable. |
void |
setUnique(boolean unique)
Sets the uniqueness property of this attribute value. |
void |
setUserFlag(int userFlag)
Sets the user flag information for the attribute |
void |
setViewCompareValue(java.lang.String viewCompareValue)
Sets the compare value associated with the view operator for the component view where this attribute belongs. |
void |
setViewOperator(short viewOperator)
Sets the view operator for the component view where this attribute belongs Only DKConstant.DK_CM_OPCODE_EQ is supported in this release. |
void |
setViewSequenceNo(short viewSeqno)
Sets the position number for this attribute in this component view |
void |
setWriteable(boolean writeable)
Sets writeable property of this attribute to true or false. |
void |
update()
Updates this attribute definition in the persistent store. |
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractAttrDef |
datastoreName, datastoreType, getDatastore, getDescription, getEntity, getEntityName, getMax, getMin, getPrecision, getScale, getSize, getType, isQueryable, isUpdatable, parsedQualifiedName, setDatastore, setDescription, setEntity, setEntityName, setMax, setMin, setPrecision, setQueryable, setScale, setSize, setType, setUpdatable |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short DK_ATTR_TYPE_DEFAULT_UNDEFINED
public static final short DK_ATTR_TYPE_DEFAULT_STRING
public static final short DK_ATTR_TYPE_DEFAULT_FLOAT
public static final short DK_ATTR_TYPE_DEFAULT_DECIMAL
public static final short DK_ATTR_TYPE_DEFAULT_INTEGER
public static final short DK_ATTR_TYPE_DEFAULT_HEXSTRING
public static final short DK_ATTR_TYPE_DEFAULT_OTHER
public short _groupSeqNo
Constructor Detail |
public DKAttrDefICM()
public DKAttrDefICM(dkDatastore ds)
ds
- - an ICM datastorepublic DKAttrDefICM(DKAttrDefICM attr)
attr
- a DKAttrDefICM objectMethod Detail |
public void add() throws DKException, java.lang.Exception
add
in class dkAbstractAttrDef
if
- an error occurs such as the name of the DKAttrDefICM object contains
invalid characters. See setAttrGroupMemberName() for the detail informationpublic void del() throws DKException, java.lang.Exception
del
in class dkAbstractAttrDef
if
- tries to delete an attribute that already associates with an
item type or delete an attribute that does not exist in the persistent storepublic void update() throws DKException, java.lang.Exception
if
- tries to update an attribute that already associates with an
item type or update an attribute that does not exist in the persistent storepublic int getIntId()
public int getGroupId()
public int getGroupMemberId()
getIntId()
,
getGroupId()
public int getEntityId() throws DKException, java.lang.Exception
DKException
- , Exceptionpublic void setUserFlag(int userFlag)
we
- use this field to set the string type for the varchar or char attribute,
either numeric, alphabetic, alpanumeric, etc. The valid user flags :
public int getUserFlag()
public int getStringType()
getStringType
in class dkAbstractAttrDef
public void setStringType(int stringType)
setStringType
in class dkAbstractAttrDef
stringType
- the string type for this attribute. The valid value is one of the following constants :
See the method getStringType() in this class to find more information
on the valid values for string type.public java.lang.String getAttrGroupName()
public void setAttrGroupName(java.lang.String attrGroupName)
attrGroupName
- - The attribute group name. This method is
valid only if this attribute is a part of an attribute group.
The valid characters of attribute group name are: 'a'-'z', 'A'-'Z', '0'-'9', '_','$', '#','@'
Attribute group name can not begin with '0'-'9, '_', and the length of the name can
not exceed 15 characters.public java.lang.String getName()
getName
in class dkAbstractAttrDef
public void setName(java.lang.String attrName)
setName
in class dkAbstractAttrDef
attrName
- - the attribute name or composite name according to the format
and explanation abovegetName()
public java.lang.String getAttrGroupMemberName()
public void setAttrGroupMemberName(java.lang.String attrGroupMemName)
attribute
- namepublic short getDefaultType()
setDefaultType(short)
public void setDefaultType(short defaultType)
defaultType
- - the default type for this attributepublic java.lang.String getDefaultValue()
setDefaultValue(String)
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- the default value for this attribute.public DKTextIndexDefICM getTextIndexDef()
setTextIndexDef(com.ibm.mm.sdk.common.DKTextIndexDefICM)
,
isTextSearchable()
public void setTextIndexDef(DKTextIndexDefICM textIndexDef)
textIndexDef
- the text search index definition object containing
the text indexing information.fi
- the attribute type is not string
see #getTextIndexDef()
see #isTextSearchable()public boolean isNullable()
isNullable
in class dkAbstractAttrDef
public void setNullable(boolean nullable)
setNullable
in class dkAbstractAttrDef
nullable
- - true or false, to indicate that this attribute can have a
null value, or must have a non-null valueisNullable()
public boolean isUnique()
setUnique(boolean)
public void setUnique(boolean unique)
unique
- - true or false, to indicate that this attribute is unique or
not uniqueisUnique()
public boolean isRMAttr()
setRMAttr(boolean)
public void setRMAttr(boolean rmAttr)
rmAttr
- - a boolean value true or falseisRMAttr()
public boolean isTextSearchable()
isTextSearchable
in class dkAbstractAttrDef
public void setTextSearchable(boolean textSearchable)
setTextSearchable
in class dkAbstractAttrDef
textSearchable
- - true or false, true makes this attribute text searchableisTextSearchable()
,
setTextIndexDef(com.ibm.mm.sdk.common.DKTextIndexDefICM)
public short getAttrFlag()
public void setAttrFlag(short attrFlag)
attrFlag
- - a short value of the flags
See getAttrFlag in this class to have the detail informationpublic boolean isReadable()
setReadable(boolean)
public void setReadable(boolean readable)
a
- boolean value true or false. True makes this attribute readableisReadable()
public boolean isWriteable()
public void setWriteable(boolean writeable)
writeable
- a boolean true or false. True makes this attribute writeablepublic boolean isRepresentative()
public void setRepresentative(boolean isRepresentative)
isRepresentative
- - a boolean value true or false.
False makes this attribute non representative attribute for this item-typepublic boolean isExcludeRow()
#setViewCompareValue(java.lang.string)
,
setViewOperator(short)
public void setExcludeRow(boolean isExcludeRow)
isExcludeRow
- - a boolean true or false. The meaning is described above.#isExcluedRow()
,
setViewCompareValue(java.lang.String)
,
setViewOperator(short)
public short getAttrViewFlag()
public void setAttrViewFlag(short attrViewFlag)
attrViewFlag
- a short value with the desired combination of bit settings
as described abovepublic short getIndexOrder()
public void setIndexOrder(short indexOrder)
indexOrder
- - the value of the index order
The valid values are:
public short getViewSequenceNo()
public void setViewSequenceNo(short viewSeqno)
viewSeqno.
- User defined the order of an attribute within
the component view as their perferencepublic java.lang.String getQualifiedName()
getQualifiedName
in class dkAbstractAttrDef
setQualifiedName(java.lang.String)
public void setQualifiedName(java.lang.String fullQualifyName)
setQualifiedName
in class dkAbstractAttrDef
fullQualifyName
- - a string value of the qualified name with the format
as described above.public java.lang.String[] parseQualifiedName(java.lang.String qualifiedName) throws DKUsageError, DKException, java.lang.Exception
qualifiedName
- the qualified name of an attributeparseQualifiedName(java.lang.String)
public java.lang.String[] parseQualifiedName() throws DKUsageError, DKException, java.lang.Exception
parseQualifiedName(java.lang.String)
public int getComponentViewId()
if
- error occurspublic void setComponentViewId(int compViewId)
compViewId
- the component type view identifierpublic short getViewOperator() throws DKException, java.lang.Exception
if
- an error occursgetViewCompareValue()
,
setViewCompareValue(java.lang.String)
public void setViewOperator(short viewOperator)
viewOperator
- the component view operator. Currently, it only accepts
DKConstant.DK_CM_OPCODE_EQ, which is the default. So, you do not need to call
this method.getViewOperator()
,
setViewCompareValue(java.lang.String)
public java.lang.String getViewCompareValue()
setViewCompareValue(java.lang.String)
public void setViewCompareValue(java.lang.String viewCompareValue)
viewCompareValue
- - the attribute compare valuepublic java.lang.String getDescription(java.lang.String langCode) throws DKException, java.lang.Exception
langCode
- attribute language code.
The valid language codes are:
"AFR", "ARA", "BEL", "BGR", "CAT", "CHT", "CHS", "CSY",
"CZE", "DAN", "DEU", "DES", "ELL", "ENA", "ENG", "ENU",
"FRB", "FRC", "ENP", "ESP", "FIN", "FRA", "FRS", "GAE",
"HEB", "HRV", "HUN", "ISL", "ITA", "ITS", "JPN", "KOR",
"MKD", "NLD", "NLB", "NON", "NOR", "PLK", "PTB", "PTG",
"RMS", "ROM", "RUS", "SKY", "SLO", "SQI", "SRB", "SRL",
"SVE", "THA", "TRK", "UKR", "URD"public void setDescription(java.lang.String desc, java.lang.String langCode) throws DKException, java.lang.Exception
desc
- - the attribute descriptionlangCode
- - the attribute language code e.g. ENU
The valid language codes are:
"AFR", "ARA", "BEL", "BGR", "CAT", "CHT", "CHS", "CSY",
"CZE", "DAN", "DEU", "DES", "ELL", "ENA", "ENG", "ENU",
"FRB", "FRC", "ENP", "ESP", "FIN", "FRA", "FRS", "GAE",
"HEB", "HRV", "HUN", "ISL", "ITA", "ITS", "JPN", "KOR",
"MKD", "NLD", "NLB", "NON", "NOR", "PLK", "PTB", "PTG",
"RMS", "ROM", "RUS", "SKY", "SLO", "SQI", "SRB", "SRL",
"SVE", "THA", "TRK", "UKR", "URD"
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |