public class XFTItem extends GenericItemObject implements ItemI, Cloneable
Modifier and Type | Field and Description |
---|---|
boolean |
child_modified |
static Comparator |
COMPARATOR |
static String |
EQUALS |
static String |
EXTENDED_FIELD_NAME |
static String |
EXTENDED_ITEM |
static TypeConverter |
JAVA_CONVERTER |
boolean |
modified |
static String |
SPECIAL_CHAR1 |
static String |
SPECIAL_CHAR2 |
static String |
SPECIAL_CHAR3 |
item_counts, props
Constructor and Description |
---|
XFTItem() |
Modifier and Type | Method and Description |
---|---|
void |
activate(UserI user)
Activates this item and all of its children.
|
void |
addHistoryItem(XFTItem history) |
void |
assignDefaultValues() |
boolean |
canActivate(UserI user)
Whether or not this user can activate this Item.
|
boolean |
canBeRootWithBase() |
boolean |
canCreate(UserI user) |
boolean |
canDelete(UserI user) |
boolean |
canEdit(UserI user)
Whether or not this user can edit this Item.
|
boolean |
canRead(UserI user)
Whether or not this user can read this Item.
|
boolean |
checkStatus(org.apache.commons.collections.Predicate compare,
boolean _default) |
static String |
CleanFilter(String s) |
void |
clearChildren(XFTFieldWrapper field1) |
Object |
clone() |
Object |
clone(boolean reviveHistory) |
Object |
cloneFormat() |
static boolean |
CompareItemsByPKs(XFTItem newI,
XFTItem oldI)
Returns true if all pk values in the two items match.
|
static boolean |
CompareItemsByPKs(XFTItem newI,
XFTItem oldI,
boolean allowNewNull,
boolean checkExtensions) |
static boolean |
CompareItemsByUniques(XFTItem newI,
XFTItem oldI) |
static boolean |
CompareItemsByUniques(XFTItem newI,
XFTItem oldI,
boolean checkExtensions) |
XFTItem |
copy()
Copies an XFTItem and its children.
|
static boolean |
EndsWithFilter(String s) |
boolean |
equals(XFTItem item2,
boolean ignorePK)
Compares all properties including primary keys (if ignorePK=false) else compares all non
primary key properties.
|
void |
extend(boolean allowMultiples)
extends the item (loads any additional children).
|
void |
extendPK()
Inserts this item's pk into any extended items.
|
Object |
findSubValue(String sub,
String key)
Uses reflection to return a field from a sub item.
|
Object |
findValue(String key)
Searches for a field in this item and its extensions.
|
Date |
getActivationDate() |
XdatUser |
getActivationUser() |
ArrayList |
getAllXMLFieldNames() |
ItemCollection |
getChildItemCollection(String field) |
ItemCollection |
getChildItemCollection(XFTFieldWrapper field)
Gets an ItemCollection of the XFTItems which are specified by the supplied field reference.
|
int |
getChildItemCount(GenericWrapperField refField,
UserI user) |
ArrayList |
getChildItemIds(GenericWrapperField refField,
UserI user) |
ArrayList<XFTItem> |
getChildItems(String id)
Returns a collection of this XFTItems which are identified by the XML reference field (dot-syntax).
|
ArrayList<XFTItem> |
getChildItems(String id,
boolean allowDBAccess) |
ArrayList<XFTItem> |
getChildItems(String id,
String xsiType,
boolean allowMultiples,
boolean allowDBAccess) |
ArrayList<XFTItem> |
getChildItems(String id,
String xsiType,
boolean allowMultiples,
boolean allowDBAccess,
UserI user) |
ArrayList<XFTItem> |
getChildItems(String id,
UserI user) |
ArrayList |
getChildItems(XFTFieldWrapper field)
Gets an ArrayList of the XFTItems which are specified by the supplied field reference.
|
ArrayList |
getChildItems(XFTFieldWrapper field,
boolean loadHistory) |
ArrayList |
getChildItems(XFTFieldWrapper field,
boolean allowChildMultiples,
String xsiType,
UserI user,
boolean loadHistory) |
ArrayList |
getChildItems(XFTFieldWrapper field,
boolean allowChildMultiples,
UserI user,
boolean loadHistory) |
ArrayList |
getChildItems(XFTFieldWrapper field,
boolean loadHistory,
XFTItemDBLoader.ItemCache cache) |
ArrayList |
getChildItems(XFTFieldWrapper field,
String xsiType,
boolean loadHistory) |
ArrayList |
getChildItems(XFTFieldWrapper field,
String xsiType,
UserI user,
boolean loadHistory) |
ArrayList |
getChildItems(XFTFieldWrapper field,
UserI user,
boolean loadHistory) |
List<XFTItem> |
getChildrenOfType(String xsiType) |
List<XFTItem> |
getChildrenOfType(String xsiType,
boolean preventLoop) |
Hashtable<String,XFTItem> |
getChildrenOfTypeWithPaths(String xsiType) |
Hashtable<String,XFTItem> |
getChildrenOfTypeWithPaths(String xsiType,
boolean preventLoop) |
ArrayList |
getCurrentChildItems(XFTFieldWrapper field,
UserI user,
boolean loadHistory) |
ItemI |
getCurrentDBMatch(boolean extend) |
XFTItem |
getCurrentDBVersion()
Returns a new XFTItem which contains the current version of this item's data from the database.
|
XFTItem |
getCurrentDBVersion(boolean allowMultiples)
Returns a new XFTItem which contains the current version of this item's data from the database.
|
XFTItem |
getCurrentDBVersion(boolean allowMultiples,
boolean allowExtension) |
XFTItemDBLoader |
getDBLoader(XFTItemDBLoader.ItemCache cache) |
String |
getDBName() |
String |
getExtensionElement() |
XFTItem |
getExtensionItem() |
XFTItem |
getExtensionItem(String extensionName) |
ItemCollection |
getExtFieldsMatches(boolean includeParent) |
Hashtable |
getFieldIds()
Returns all possible field ids for this element and its extensions (with DATA,SINGLE,MULTI as values).
|
ItemCollection |
getFieldMatches(boolean extend)
Returns ArrayList of XFTItems where all fields match.
|
ItemSearch |
getFieldsMatchSearch(boolean includeParent)
ArrayList of SearchCriteria of primaryKeyName/value pairs
|
String |
getFileName() |
static Map |
GetFilterOptions(String s) |
XFTItem |
getFirstHistory() |
GenericWrapperElement |
getGenericSchemaElement()
Returns the GenericWrapperElement for this item from the schema
|
ItemCollection |
getHistory() |
ArrayList |
getHistoryItems() |
Hashtable |
getIDREFs()
IF the coresponding element has any ':IDREF' fields, then those field's values are returned.
|
String |
getIDValue()
IF the coresponding element has an ':ID' field, then that field's value is returned.
|
Date |
getInsertDate() |
XdatUserI |
getInsertUser() |
XFTItem |
getItem() |
Date |
getLastModified() |
ItemI |
getMeta() |
Integer |
getMetaDataId() |
ItemI |
getParent()
Returns the parent XFTItem
|
ArrayList<XFTItem> |
getParents(String xsiType) |
Object |
getPK() |
ItemCollection |
getPkMatches(boolean extend)
Returns ArrayList of XFTItems with matching pks.
|
ArrayList<String> |
getPkNames()
Returns the sql names of the pk fields for this item.
|
CriteriaCollection |
getPkSearch(boolean withChildren)
ArrayList of SearchCriteria of primaryKeyName/value pairs
|
String |
getPKString() |
Map<String,Object> |
getPkValues()
Hashtable of primaryKeyName/value pairs
|
String |
getPKValueString() |
Map<GenericWrapperField,Object> |
getPkValuesWTypes()
Returns the sql names of the pk fields for this item.
|
ArrayList<Object[]> |
getPossibleFieldNames()
returns the names of the possible fields for this item.
|
ArrayList |
getPossibleValues(String xmlPath)
Returns the possible value for this XML field (based on enumerations in the XML Schema).
|
ArrayList |
getPossibleValuesFromDB(String xmlPath) |
String |
getProperName()
If this element has a stored ProperName in the XFTReferenceManager's
proper names hashtable.
|
Object |
getProperty(GenericWrapperField f) |
Object |
getProperty(GenericWrapperField f,
boolean allowMulitpleReturns) |
Object |
getProperty(GenericWrapperField f,
boolean allowMulitpleReturns,
UserI user) |
Object |
getProperty(String id)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
Object |
getProperty(String id,
boolean allowMultipleValues) |
Object |
getProperty(String id,
boolean allowMultipleValues,
UserI user) |
ArrayList |
getRefNames()
returns the names of references elements
|
Date |
getRowLastModified() |
ArrayList |
getSingleXMLFieldNames() |
String |
getStatus() |
String |
getUniqueFileName() |
ItemCollection |
getUniqueMatches(boolean extend)
Returns ArrayList of XFTItems with matching unique fields.
|
CriteriaCollection |
getUniqueSearch()
ArrayList of SearchCriteria of uniqueField/value pairs
|
UserI |
getUser() |
String |
getValidXMLProperty(String xmlPath) |
Long |
getXFTVersion() |
Hashtable |
getXmlFieldNames() |
String |
getXSIType()
Full XML Type name
|
boolean |
hasExtendedField()
If the corresponding element is extended by another element and has an Extension Element.
|
boolean |
hasHistory() |
boolean |
hasIDField()
If the corresponding element has a field of type ':ID'
|
boolean |
hasLocalField(String f) |
boolean |
hasPK() |
boolean |
hasProperty(String id,
Object find) |
boolean |
hasUniques() |
boolean |
hasUniques(boolean checkExtensions) |
boolean |
hasXMLContent(boolean allowDBAccess) |
boolean |
hasXMLContent(XMLWrapperField field,
boolean allowDBAccess) |
static String |
identity(XFTItem i) |
void |
importNonItemFields(XFTItem temp,
boolean onlyMetaFields) |
void |
importPK(XFTItem temp) |
boolean |
instanceOf(String xsiType) |
void |
internValues() |
boolean |
isActive()
whether or not this Item has been activated.
|
boolean |
isChildOf(String elementName) |
boolean |
isHistory() |
boolean |
isLoading() |
boolean |
isLocked()
whether or not this Item has been activated.
|
boolean |
isModified() |
boolean |
isPauseDBAccess() |
boolean |
isPKField(String xmlPath) |
boolean |
isPreLoaded() |
boolean |
isQuarantine()
whether or not this Item has been activated.
|
boolean |
isShareable() |
boolean |
isValid() |
boolean |
isVerifyXMLPaths() |
void |
lock(UserI user)
Lock this item and all of its children.
|
boolean |
matchXSIType(String t) |
boolean |
needsActivation()
Whether or not this user needs Activation
|
static XFTItem |
NewEmptyItem(UserI user) |
static XFTItem |
NewItem(GenericWrapperElement e,
Map hash,
boolean throwException,
UserI user) |
static XFTItem |
NewItem(GenericWrapperElement e,
UserI user) |
static XFTItem |
NewItem(String n,
Map hash,
boolean throwException,
UserI user) |
static XFTItem |
NewItem(String n,
UserI user) |
static XFTItem |
NewMetaDataElement(UserI user,
String name,
boolean quarantine,
Date insert_date,
Object xft_version) |
static XFTItem |
NewPrePopulatedItem(String name,
UserI user) |
int |
nextIndexOfSeperator(String xmlPath) |
String |
output() |
String |
output(String templateName) |
Object |
parseObject(String type,
String value) |
ItemI |
populateChildItems(ArrayList parents,
boolean rePopulateRefs)
Populates Child items.
|
void |
populateFromFlatString(String s) |
void |
populateHistories() |
static XFTItem |
PopulateItemFromFlatString(String s,
UserI user) |
static XFTItem |
PopulateItemFromFlatString(String s,
UserI user,
boolean allowMultiples) |
static XFTItem |
PopulateItemsFromQueryOrganizer(QueryOrganizer qo,
GenericWrapperElement e,
ArrayList parents,
Hashtable row)
If any fields in this Object array have matching header values, then those fields are put into
the XFTItem.
|
ItemI |
populateRefItems()
Populates any referenced items.
|
void |
quarantine(UserI user)
Quarantine this item and all of its children.
|
void |
readExternal(ObjectInput in) |
static XFTItem |
ReconcileItems(XFTItem primary,
XFTItem secondary,
boolean allowMultiples)
This item compares the reference items of each item.
|
void |
removeChild(String xmlPath,
int index) |
void |
removeChildFromDB(String xmlPath,
XFTItem child,
UserI user,
EventMetaI c) |
void |
removeEmptyItems()
Removes child items which have no properties set.
|
void |
removeItem(ItemI child) |
void |
removeItem(XFTItem child) |
void |
save(UserI user,
boolean overrideSecurity,
boolean quarantine,
boolean overrideQuarantine,
boolean allowItemRemoval,
EventMetaI c) |
boolean |
save(UserI user,
boolean overrideSecurity,
boolean allowItemRemoval,
EventMetaI c)
Stores this item's data in the database.
|
static XFTItem |
SelectItemByIds(GenericWrapperElement element,
Object[] ids,
UserI user,
boolean allowMultiples,
boolean preventLoop) |
void |
setChild(String xmlPath,
ItemI value,
boolean replace) |
void |
setChild(XFTFieldWrapper field,
ItemI value,
boolean replace)
Adds the provided item (value) as a child of this item.
|
void |
setChild(XFTFieldWrapper field,
ItemI value,
int index) |
void |
setChild(XFTFieldWrapper field,
ItemI value,
int index,
String xsiType) |
void |
setDirectProperty(GenericWrapperField f,
Object value) |
void |
setDirectProperty(String sql_name,
Object value) |
void |
setElement(GenericWrapperElement element)
Sets the corresponding element for this item, and the item's name
|
void |
setExtenderName()
If the corresponding element is extended and has an Extended field, then
the name of this item's extending item is put into the property of this item
using the EXTENDED_FIELD_NAME specified in this class.
|
void |
setFieldIds(Hashtable fieldIds) |
boolean |
setFieldValue(String fieldName,
Object value)
If the corresponding element for this item stipulates that this item (or any of its extensions)
can have a field of this fieldName, then it is added to the properties.
|
void |
setLoading(boolean l) |
void |
setMeta(ItemI meta) |
void |
setParent(ItemI item)
Sets the parent XFTItem
|
void |
setPauseDBAccess(boolean pauseDBAccess) |
void |
setPreLoaded(boolean preLoaded) |
void |
setProperty(String xmlPath,
Object value)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
void |
setProperty(String xmlPath,
Object value,
boolean parseValue) |
void |
setStatus(UserI user,
String status)
Set status 'quarantine', 'active', or 'locked'
|
void |
setUser(UserI user) |
void |
setVerifyXMLPaths(boolean verifyXMLPaths) |
void |
setXmlFieldNames(Hashtable xmlFieldNames) |
void |
setXmlType(String string)
Full XML Type name
|
String |
toHTML()
Translates this item to an HTML representation.
|
String |
toHTML(FlattenedItemA.HistoryConfigI includeHistory) |
Document |
toJoinedXML() |
String |
toString() |
Document |
toWebXML(String location,
boolean limited) |
ByteArrayOutputStream |
toXML_BOS(String location)
Save item data to DB.
|
ByteArrayOutputStream |
toXML_BOS(String location,
boolean limited) |
String |
toXML_HTML() |
Document |
toXML_Item()
Outputs a debugging version of the XFTItem into XML format.
|
String |
toXML_String() |
String |
toXML_String(boolean allowSchemaLocation) |
Document |
toXML()
Translates the XFTItem to a simple XML DOM document.
|
Document |
toXML(boolean allowSchemaLocation)
Translates the XFTItem to a simple XML DOM document.
|
Node |
toXML(Document doc)
Translates the XFTItem to a simple XML DOM node.
|
void |
toXML(OutputStream out,
boolean allowDBAccess)
Translates this item to its XML representation.
|
void |
toXML(OutputStream out,
String schemaDir,
boolean allowDBAccess)
Translates this item to its XML representation.
|
void |
toXML(Writer out,
boolean allowDBAccess)
Translates this item to its XML representation.
|
void |
toXML(Writer out,
String schemaDir,
boolean allowDBAccess)
Translates this item to its XML representation.
|
ValidationResults |
validate()
Validates this item's content.
|
void |
writeExternal(ObjectOutput out) |
String |
writeToFlatString(int count) |
clear, getBooleanProperty, getBooleanProperty, getBooleanProperty, getChildItems, getDateProperty, getDoubleProperty, getField, getField, getFloatProperty, getIntegerProperty, getPropertyCount, getProps, getSecurityValues, getStringProperty, hasProperties, setField, setProperties
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBooleanProperty, getBooleanProperty, getBooleanProperty, getChildItems, getDateProperty, getProps, getStringProperty
public static final String EQUALS
public static Comparator COMPARATOR
public static final String EXTENDED_FIELD_NAME
public static final String EXTENDED_ITEM
public static final TypeConverter JAVA_CONVERTER
public boolean modified
public boolean child_modified
public static final String SPECIAL_CHAR1
public static final String SPECIAL_CHAR2
public static final String SPECIAL_CHAR3
public void assignDefaultValues() throws XFTInitException, ElementNotFoundException
public static XFTItem NewItem(GenericWrapperElement e, Map hash, boolean throwException, UserI user) throws ElementNotFoundException, FieldNotFoundException, InvalidValueException
e
- hash
- throwException
- ElementNotFoundException
FieldNotFoundException
InvalidValueException
public static XFTItem NewItem(String n, Map hash, boolean throwException, UserI user) throws ElementNotFoundException, FieldNotFoundException, InvalidValueException
n
- elementNamehash
- dot-sytax propertiesthrowException
- ElementNotFoundException
FieldNotFoundException
InvalidValueException
public static XFTItem NewItem(String n, UserI user) throws XFTInitException, ElementNotFoundException
n
- elementNameXFTInitException
ElementNotFoundException
public static XFTItem NewItem(GenericWrapperElement e, UserI user)
e
- public static XFTItem NewMetaDataElement(UserI user, String name, boolean quarantine, Date insert_date, Object xft_version)
user
- name
- public static XFTItem NewPrePopulatedItem(String name, UserI user) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
name
- XFTInitException
ElementNotFoundException
FieldNotFoundException
public void removeEmptyItems() throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public Hashtable getFieldIds() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public Hashtable getXmlFieldNames() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public void setFieldIds(Hashtable fieldIds)
fieldIds
- The fieldIds to set.public void setXmlFieldNames(Hashtable xmlFieldNames)
xmlFieldNames
- The xmlFieldNames to set.public String getXSIType()
getXSIType
in interface ItemI
getXSIType
in class GenericItemObject
public boolean matchXSIType(String t)
public String getProperName() throws ElementNotFoundException
ElementNotFoundException
public String getFileName() throws ElementNotFoundException
ElementNotFoundException
public String getUniqueFileName() throws ElementNotFoundException
ElementNotFoundException
public void setXmlType(String string)
string
- public boolean hasIDField() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public String getIDValue() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public Hashtable getIDREFs() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public String toXML_HTML()
public String toXML_String()
public String toXML_String(boolean allowSchemaLocation)
public Node toXML(Document doc)
doc
- public Document toXML(boolean allowSchemaLocation) throws Exception
Exception
public Document toWebXML(String location, boolean limited) throws Exception
location
- Exception
public Document toXML_Item()
public Object findSubValue(String sub, String key)
sub
- Item.subItem.itemToReturnkey
- public Object findValue(String key) throws ElementNotFoundException, XFTInitException
key
- sql_nameElementNotFoundException
XFTInitException
public ItemI populateRefItems() throws Exception
Exception
public ItemI populateChildItems(ArrayList parents, boolean rePopulateRefs) throws XFTInitException
XFTInitException
public void extend(boolean allowMultiples) throws XFTInitException, ElementNotFoundException, DBPoolException, SQLException, Exception
ItemI
extend
in interface ItemI
XFTInitException
ElementNotFoundException
DBPoolException
SQLException
Exception
public ArrayList<String> getPkNames() throws XFTInitException
XFTInitException
public boolean isPKField(String xmlPath) throws XFTInitException
xmlPath
- XFTInitException
public boolean hasPK() throws XFTInitException, ElementNotFoundException, FieldNotFoundException
XFTInitException
ElementNotFoundException
FieldNotFoundException
public Map<String,Object> getPkValues() throws XFTInitException, ElementNotFoundException, FieldNotFoundException
XFTInitException
FieldNotFoundException
ElementNotFoundException
public Map<GenericWrapperField,Object> getPkValuesWTypes() throws XFTInitException
XFTInitException
public Object getPK()
public CriteriaCollection getPkSearch(boolean withChildren) throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public CriteriaCollection getUniqueSearch() throws XFTInitException, ElementNotFoundException, Exception
XFTInitException
ElementNotFoundException
Exception
public boolean hasUniques() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public boolean hasUniques(boolean checkExtensions) throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public GenericWrapperElement getGenericSchemaElement() throws ElementNotFoundException
ElementNotFoundException
public boolean instanceOf(String xsiType) throws ElementNotFoundException
ElementNotFoundException
public ArrayList<Object[]> getPossibleFieldNames() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public ArrayList getPossibleValues(String xmlPath) throws Exception
ItemI
getPossibleValues
in interface ItemI
Exception
public ArrayList getPossibleValuesFromDB(String xmlPath) throws Exception
Exception
public ArrayList<XFTItem> getParents(String xsiType) throws ElementNotFoundException
ElementNotFoundException
public void setElement(GenericWrapperElement element)
element
- public boolean equals(XFTItem item2, boolean ignorePK) throws XFTInitException
item2
- Item to compareignorePK
- true to ignore primary keys in comparisonXFTInitException
public void importPK(XFTItem temp)
public void importNonItemFields(XFTItem temp, boolean onlyMetaFields)
temp
- public ArrayList getRefNames() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public ItemCollection getPkMatches(boolean extend) throws DBPoolException, ElementNotFoundException, XFTInitException, SQLException, FieldNotFoundException, Exception
public ItemCollection getExtFieldsMatches(boolean includeParent) throws DBPoolException, ElementNotFoundException, XFTInitException, SQLException, FieldNotFoundException, Exception
public ItemSearch getFieldsMatchSearch(boolean includeParent) throws XFTInitException, ElementNotFoundException, Exception
XFTInitException
ElementNotFoundException
Exception
public ItemCollection getUniqueMatches(boolean extend) throws DBPoolException, ElementNotFoundException, XFTInitException, SQLException, FieldNotFoundException, Exception
public ItemCollection getFieldMatches(boolean extend) throws DBPoolException, ElementNotFoundException, XFTInitException, SQLException, FieldNotFoundException, Exception
public boolean setFieldValue(String fieldName, Object value) throws ElementNotFoundException, XFTInitException
fieldName
- value
- ElementNotFoundException
XFTInitException
public boolean hasLocalField(String f) throws ElementNotFoundException, XFTInitException
f
- ElementNotFoundException
XFTInitException
public void setChild(XFTFieldWrapper field, ItemI value, boolean replace) throws ElementNotFoundException, XFTInitException, FieldNotFoundException
sqlName
- value
- ElementNotFoundException
XFTInitException
FieldNotFoundException
public void setChild(String xmlPath, ItemI value, boolean replace) throws ElementNotFoundException, XFTInitException, FieldNotFoundException, Exception
xmlPath
- value
- ElementNotFoundException
XFTInitException
FieldNotFoundException
Exception
public void setChild(XFTFieldWrapper field, ItemI value, int index, String xsiType) throws ElementNotFoundException, XFTInitException, FieldNotFoundException
field
- value
- index
- ElementNotFoundException
XFTInitException
FieldNotFoundException
public void setChild(XFTFieldWrapper field, ItemI value, int index) throws ElementNotFoundException, XFTInitException, FieldNotFoundException
field
- value
- index
- ElementNotFoundException
XFTInitException
FieldNotFoundException
public static XFTItem ReconcileItems(XFTItem primary, XFTItem secondary, boolean allowMultiples) throws ElementNotFoundException, XFTInitException, Exception
primary
- Maintained objectsecondary
- object to reconcile into the primary object.ElementNotFoundException
XFTInitException
Exception
public static boolean CompareItemsByPKs(XFTItem newI, XFTItem oldI) throws Exception
item1
- item2
- ElementNotFoundException
XFTInitException
InvalidReference
Exception
public static boolean CompareItemsByPKs(XFTItem newI, XFTItem oldI, boolean allowNewNull, boolean checkExtensions) throws Exception
newI
- oldI
- allowNewNull
- ElementNotFoundException
XFTInitException
Exception
public static boolean CompareItemsByUniques(XFTItem newI, XFTItem oldI) throws Exception
newI
- oldI
- allowNewNull
- ElementNotFoundException
XFTInitException
Exception
public static boolean CompareItemsByUniques(XFTItem newI, XFTItem oldI, boolean checkExtensions) throws Exception
newI
- oldI
- allowNewNull
- ElementNotFoundException
XFTInitException
Exception
public ItemI getParent()
public void setParent(ItemI item)
public boolean hasExtendedField() throws ElementNotFoundException
ElementNotFoundException
public void setExtenderName() throws ElementNotFoundException, XFTInitException, Exception
public void extendPK()
public String getExtensionElement() throws ElementNotFoundException, XFTInitException, Exception
ElementNotFoundException
XFTInitException
Exception
public XFTItem getExtensionItem() throws ElementNotFoundException, XFTInitException, FieldNotFoundException
ElementNotFoundException
XFTInitException
FieldNotFoundException
public XFTItem getExtensionItem(String extensionName) throws ElementNotFoundException, XFTInitException, FieldNotFoundException
ElementNotFoundException
XFTInitException
FieldNotFoundException
public Object clone(boolean reviveHistory)
public Object cloneFormat()
public XFTItem copy()
public static XFTItem PopulateItemFromFlatString(String s, UserI user, boolean allowMultiples) throws ElementNotFoundException, Exception
ElementNotFoundException
Exception
public static XFTItem PopulateItemFromFlatString(String s, UserI user) throws Exception
Exception
public static XFTItem PopulateItemsFromQueryOrganizer(QueryOrganizer qo, GenericWrapperElement e, ArrayList parents, Hashtable row) throws ElementNotFoundException, XFTInitException, FieldNotFoundException, Exception
row
- headers
- name
- ElementNotFoundException
XFTInitException
FieldNotFoundException
Exception
public boolean hasProperty(String id, Object find) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
hasProperty
in interface ItemI
XFTInitException
ElementNotFoundException
FieldNotFoundException
public Object getProperty(String id) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
ItemI
getProperty
in interface ItemI
getProperty
in class GenericItemObject
XFTInitException
ElementNotFoundException
FieldNotFoundException
public Object getProperty(String id, boolean allowMultipleValues) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public Object getProperty(String id, boolean allowMultipleValues, UserI user) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public Object getProperty(GenericWrapperField f)
f
- public Object getProperty(GenericWrapperField f, boolean allowMulitpleReturns)
f
- public Object getProperty(GenericWrapperField f, boolean allowMulitpleReturns, UserI user)
f
- public static boolean EndsWithFilter(String s)
public ArrayList getAllXMLFieldNames()
public ArrayList getSingleXMLFieldNames() throws Exception
Exception
public void setProperty(String xmlPath, Object value) throws XFTInitException, ElementNotFoundException, FieldNotFoundException, InvalidValueException
ItemI
setProperty
in interface ItemI
setProperty
in class GenericItemObject
XFTInitException
ElementNotFoundException
FieldNotFoundException
InvalidValueException
public void setProperty(String xmlPath, Object value, boolean parseValue) throws XFTInitException, ElementNotFoundException, FieldNotFoundException, InvalidValueException
public void setDirectProperty(String sql_name, Object value) throws XFTInitException, ElementNotFoundException
sql_name
- value
- XFTInitException
ElementNotFoundException
public void setDirectProperty(GenericWrapperField f, Object value) throws XFTInitException, ElementNotFoundException
f
- value
- XFTInitException
ElementNotFoundException
public ArrayList<XFTItem> getChildItems(String id, UserI user) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList<XFTItem> getChildItems(String id) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
ItemI
getChildItems
in interface ItemI
XFTInitException
ElementNotFoundException
FieldNotFoundException
public ArrayList<XFTItem> getChildItems(String id, boolean allowDBAccess) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList<XFTItem> getChildItems(String id, String xsiType, boolean allowMultiples, boolean allowDBAccess) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList<XFTItem> getChildItems(String id, String xsiType, boolean allowMultiples, boolean allowDBAccess, UserI user) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public int nextIndexOfSeperator(String xmlPath)
public boolean isChildOf(String elementName)
public void clearChildren(XFTFieldWrapper field1)
public ArrayList getChildItems(XFTFieldWrapper field, UserI user, boolean loadHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList getChildItems(XFTFieldWrapper field) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
ItemI
getChildItems
in interface ItemI
XFTInitException
ElementNotFoundException
FieldNotFoundException
public ArrayList getChildItems(XFTFieldWrapper field, boolean loadHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
getChildItems
in interface ItemI
XFTInitException
ElementNotFoundException
FieldNotFoundException
public ArrayList getChildItems(XFTFieldWrapper field, boolean loadHistory, XFTItemDBLoader.ItemCache cache) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList getChildItems(XFTFieldWrapper field, String xsiType, UserI user, boolean loadHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList getChildItems(XFTFieldWrapper field, String xsiType, boolean loadHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList getChildItems(XFTFieldWrapper field, boolean allowChildMultiples, UserI user, boolean loadHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList getChildItems(XFTFieldWrapper field, boolean allowChildMultiples, String xsiType, UserI user, boolean loadHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ArrayList getCurrentChildItems(XFTFieldWrapper field, UserI user, boolean loadHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public XFTItemDBLoader getDBLoader(XFTItemDBLoader.ItemCache cache)
public ItemCollection getChildItemCollection(String field) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
public ItemCollection getChildItemCollection(XFTFieldWrapper field) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
ItemI
getChildItemCollection
in interface ItemI
XFTInitException
ElementNotFoundException
FieldNotFoundException
public ByteArrayOutputStream toXML_BOS(String location) throws Exception
ItemI
public ByteArrayOutputStream toXML_BOS(String location, boolean limited) throws Exception
Exception
public boolean checkStatus(org.apache.commons.collections.Predicate compare, boolean _default) throws MetaDataException
MetaDataException
public boolean isQuarantine() throws MetaDataException
MetaDataException
public boolean isLocked() throws MetaDataException
MetaDataException
public boolean isActive() throws MetaDataException
isActive
in interface ItemI
MetaDataException
public String toHTML() throws Exception
ItemI
public String toHTML(FlattenedItemA.HistoryConfigI includeHistory) throws Exception
Exception
public boolean save(UserI user, boolean overrideSecurity, boolean allowItemRemoval, EventMetaI c) throws InvalidItemException, Exception
ItemI
save
in interface ItemI
Exception
InvalidItemException
public void save(UserI user, boolean overrideSecurity, boolean quarantine, boolean overrideQuarantine, boolean allowItemRemoval, EventMetaI c) throws Exception
public void addHistoryItem(XFTItem history)
history
- public ArrayList getHistoryItems() throws FieldNotFoundException
FieldNotFoundException
public boolean hasHistory() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public void populateHistories() throws XFTInitException, ElementNotFoundException
public ItemCollection getHistory()
public XFTItem getFirstHistory() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public ItemI getMeta()
public void setMeta(ItemI meta)
meta
- The meta to set.public void setStatus(UserI user, String status) throws Exception
user
- Exception
public void activate(UserI user) throws Exception
ItemI
public void quarantine(UserI user) throws Exception
ItemI
quarantine
in interface ItemI
Exception
public void lock(UserI user) throws Exception
ItemI
public boolean needsActivation() throws Exception
ItemI
needsActivation
in interface ItemI
Exception
public ValidationResults validate() throws Exception
ItemI
public XFTItem getCurrentDBVersion()
ItemI
getCurrentDBVersion
in interface ItemI
public XFTItem getCurrentDBVersion(boolean allowMultiples)
ItemI
getCurrentDBVersion
in interface ItemI
public XFTItem getCurrentDBVersion(boolean allowMultiples, boolean allowExtension)
public ItemI getCurrentDBMatch(boolean extend)
public ArrayList getChildItemIds(GenericWrapperField refField, UserI user)
refField
- user
- public int getChildItemCount(GenericWrapperField refField, UserI user)
public void removeItem(ItemI child) throws Exception
child
- Exception
public void removeItem(XFTItem child) throws Exception
child
- Exception
public void removeChild(String xmlPath, int index) throws FieldNotFoundException, IndexOutOfBoundsException
public void removeChildFromDB(String xmlPath, XFTItem child, UserI user, EventMetaI c) throws SQLException, Exception
child
- user
- SQLException
Exception
public boolean canRead(UserI user) throws Exception
ItemI
public boolean canEdit(UserI user) throws Exception
ItemI
public boolean canActivate(UserI user) throws Exception
ItemI
canActivate
in interface ItemI
Exception
public Date getActivationDate()
public Date getLastModified()
public Date getRowLastModified()
public Long getXFTVersion()
public Date getInsertDate()
public XdatUser getActivationUser()
public XdatUserI getInsertUser()
public String getStatus()
public boolean isModified()
public boolean isShareable()
public Integer getMetaDataId()
public boolean isLoading()
public void setLoading(boolean l)
preLoaded
- The preLoaded to set.public boolean isPreLoaded()
public void setPreLoaded(boolean preLoaded)
preLoaded
- The preLoaded to set.public void setUser(UserI user)
user
- The user to set.public boolean isPauseDBAccess()
public void setPauseDBAccess(boolean pauseDBAccess)
pauseDBAccess
- The pauseDBAccess to set.public boolean isVerifyXMLPaths()
public void setVerifyXMLPaths(boolean verifyXMLPaths)
verifyXMLPaths
- The verifyXMLPaths to set.public Document toJoinedXML() throws Exception
toJoinedXML
in interface ItemI
Exception
public String output()
public boolean canBeRootWithBase()
public String writeToFlatString(int count) throws IOException
IOException
public void populateFromFlatString(String s) throws Exception
Exception
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public static XFTItem SelectItemByIds(GenericWrapperElement element, Object[] ids, UserI user, boolean allowMultiples, boolean preventLoop) throws Exception
Exception
public boolean hasXMLContent(boolean allowDBAccess)
public boolean hasXMLContent(XMLWrapperField field, boolean allowDBAccess)
public void toXML(OutputStream out, boolean allowDBAccess) throws IllegalArgumentException, SAXException
ItemI
toXML
in interface ItemI
out
- IllegalArgumentException
SAXException
public void toXML(Writer out, boolean allowDBAccess) throws IllegalArgumentException, SAXException
ItemI
toXML
in interface ItemI
out
- IllegalArgumentException
SAXException
public void toXML(OutputStream out, String schemaDir, boolean allowDBAccess) throws IllegalArgumentException, SAXException
ItemI
toXML
in interface ItemI
out
- IllegalArgumentException
SAXException
public void toXML(Writer out, String schemaDir, boolean allowDBAccess) throws IllegalArgumentException, SAXException
ItemI
toXML
in interface ItemI
out
- IllegalArgumentException
SAXException
public Hashtable<String,XFTItem> getChildrenOfTypeWithPaths(String xsiType)
public Hashtable<String,XFTItem> getChildrenOfTypeWithPaths(String xsiType, boolean preventLoop)
public String getPKString()
public String getPKValueString()
public void internValues()
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.