public interface ItemI extends Externalizable
Modifier and Type | Method and Description |
---|---|
void |
activate(UserI user)
Activates this item and all of its children.
|
boolean |
canActivate(UserI user)
Whether or not this user can activate this Item.
|
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.
|
void |
extend(boolean allowMultiples)
extends the item (loads any additional children).
|
Boolean |
getBooleanProperty(String name)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
boolean |
getBooleanProperty(String name,
boolean default_value)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
boolean |
getBooleanProperty(String name,
String default_value)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
ItemCollection |
getChildItemCollection(XFTFieldWrapper field)
Gets an ItemCollection of the XFTItems which are specified by the supplied field reference.
|
ArrayList |
getChildItems()
Gets all XFTItem child items.
|
ArrayList<XFTItem> |
getChildItems(String xmlPath)
Returns a collection of this XFTItems which are identified by the XML reference field (dot-syntax).
|
ArrayList |
getChildItems(XFTFieldWrapper field)
Gets an ArrayList of the XFTItems which are specified by the supplied field reference.
|
ArrayList |
getChildItems(XFTFieldWrapper field,
boolean includeHistory) |
XFTItem |
getCurrentDBVersion()
Returns a new XFTItem which contains the current version of this item's data from the database.
|
XFTItem |
getCurrentDBVersion(boolean withChildren)
Returns a new XFTItem which contains the current version of this item's data from the database.
|
Date |
getDateProperty(String name) |
String |
getDBName() |
XFTItem |
getItem() |
ItemI |
getParent()
returns parent Item (if there is one).
|
ArrayList |
getPossibleValues(String xmlPath)
Returns the possible value for this XML field (based on enumerations in the XML Schema).
|
Object |
getProperty(String name)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
Hashtable |
getProps()
returns Hashtable of this item's properties.
|
String |
getStringProperty(String name)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
UserI |
getUser() |
String |
getXSIType()
Gets the data type name of this item.
|
boolean |
hasProperty(String id,
Object find) |
boolean |
isActive()
returns if this item is activated.
|
void |
lock(UserI user)
Lock this item and all of its children.
|
boolean |
needsActivation()
Whether or not this user needs Activation
|
String |
output() |
String |
output(String velocityTemplateName) |
void |
quarantine(UserI user)
Quarantine this item and all of its children.
|
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.
|
void |
setParent(ItemI item)
sets the parent item for this item.
|
void |
setProperty(String xmlPath,
Object value)
Can take the sql name of a local field, or the XML dot syntax name for child fields.
|
String |
toHTML()
Translates this item to an HTML representation.
|
Document |
toJoinedXML() |
ByteArrayOutputStream |
toXML_BOS(String location)
Save item data to DB.
|
Document |
toXML()
Translates this item to its XML representation using DOM.
|
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.
|
readExternal, writeExternal
boolean getBooleanProperty(String name, boolean default_value) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
name
- default_value
- XFTInitException
ElementNotFoundException
FieldNotFoundException
boolean getBooleanProperty(String name, String default_value) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
name
- default_value
- XFTInitException
ElementNotFoundException
FieldNotFoundException
Boolean getBooleanProperty(String name) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
name
- XFTInitException
ElementNotFoundException
FieldNotFoundException
Object getProperty(String name) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
name
- XFTInitException
ElementNotFoundException
FieldNotFoundException
Date getDateProperty(String name) throws XFTInitException, ElementNotFoundException, FieldNotFoundException, ParseException
boolean hasProperty(String id, Object find) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
void setProperty(String xmlPath, Object value) throws Exception
xmlPath
- value
- Exception
ArrayList getChildItems(XFTFieldWrapper field) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
field
- XFTInitException
ElementNotFoundException
FieldNotFoundException
ArrayList getChildItems(XFTFieldWrapper field, boolean includeHistory) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
ItemCollection getChildItemCollection(XFTFieldWrapper field) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
field
- XFTInitException
ElementNotFoundException
FieldNotFoundException
ArrayList getChildItems() throws XFTInitException, ElementNotFoundException, FieldNotFoundException
XFTInitException
ElementNotFoundException
FieldNotFoundException
ItemI getParent()
void setParent(ItemI item)
item
- void extend(boolean allowMultiples) throws XFTInitException, ElementNotFoundException, DBPoolException, SQLException, Exception
String toHTML() throws Exception
Exception
Document toXML() throws Exception
Exception
void toXML(OutputStream out, String schemaDir, boolean allowDBAccess) throws IllegalArgumentException, SAXException
void toXML(Writer out, String schemaDir, boolean allowDBAccess) throws IllegalArgumentException, SAXException
void toXML(OutputStream out, boolean allowDBAccess) throws IllegalArgumentException, SAXException
void toXML(Writer out, boolean allowDBAccess) throws IllegalArgumentException, SAXException
String getXSIType()
boolean isActive() throws MetaDataException
MetaDataException
Hashtable getProps()
boolean save(UserI user, boolean overrideSecurity, boolean allowItemRemoval, EventMetaI c) throws Exception
user
- Exception
void save(UserI user, boolean overrideSecurity, boolean quarantine, boolean overrideQuarantine, boolean allowItemRemoval, EventMetaI c) throws Exception
Exception
ByteArrayOutputStream toXML_BOS(String location) throws Exception
location
- Exception
void activate(UserI user) throws Exception
user
- Exception
void lock(UserI user) throws Exception
user
- Exception
void quarantine(UserI user) throws Exception
user
- Exception
ValidationResults validate() throws Exception
Exception
String getStringProperty(String name) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
name
- XFTInitException
ElementNotFoundException
FieldNotFoundException
XFTItem getCurrentDBVersion()
XFTItem getCurrentDBVersion(boolean withChildren)
boolean needsActivation() throws Exception
user
- Exception
boolean canRead(UserI user) throws Exception
user
- Exception
boolean canEdit(UserI user) throws Exception
user
- Exception
boolean canActivate(UserI user) throws Exception
user
- Exception
ArrayList getPossibleValues(String xmlPath) throws Exception
xmlPath
- Exception
ArrayList<XFTItem> getChildItems(String xmlPath) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
xmlPath
- XFTInitException
ElementNotFoundException
FieldNotFoundException
UserI getUser()
XFTItem getItem()
String getDBName()
String output()
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.