|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.OBBase com.oberon.ooql.sdk.AdminBase com.oberon.ooql.sdk.View
public class View
View: represents a [User] View used to show object properties in tabled format
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_VIEW
|
static java.lang.String[] |
vDefaultFields
|
static java.lang.String[] |
vDefaultNames
|
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
View()
|
|
View(java.lang.String name)
Define a new View associated to all users |
|
View(java.lang.String name,
java.lang.String userName)
Define a new View associated to a specific User |
Method Summary | |
---|---|
void |
addColumn(Column column)
Appends a new Column to the View |
void |
addColumnAfter(Column column,
java.lang.String refColumn)
Add a Column after another reference Column |
void |
addColumnBefore(Column column,
java.lang.String refColumn)
Add a Column before another reference Column |
java.lang.String |
compareUpdate(View refView,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this View object and let it become equals to another reference object. |
void |
compose(ObjectObj rootObject,
java.util.Vector<java.lang.Object> objects,
Selector selector,
java.io.DataOutputStream outStream,
Framework framework)
Compose the View for the current User and for a set of objects extracted by navigation of a root element |
void |
compose(java.util.Vector<java.lang.Object> objects,
Selector selector,
java.io.DataOutputStream outStream,
Framework framework)
Compose the View for the current User and for a set of objects extracted with a query |
void |
create(boolean overwrite,
boolean force,
Framework framework)
Create a new View object on the database |
void |
create(Framework framework)
Create a new View object on the database |
void |
destroy(Framework framework)
Remove the View object from the database. |
void |
fromXML(org.jdom.Element rootElement)
Load the View object from XML element tree |
void |
fromXML(org.jdom.Element rootElement,
boolean loadColumns)
Load the View object from XML element tree |
java.util.Vector<java.lang.String> |
getAccessColumnNames(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all View Column names for which the framework User has access |
java.util.Vector<Column> |
getAccessColumns(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all View Column for which the framework User has access |
java.lang.String |
getAccessColumnsAsString(int accessType,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework,
java.lang.String delim)
Get all View Column names for which the framework User has access as a single string |
Column |
getColumn(int columnId)
Get a View Column with the given internal id |
Column |
getColumn(java.lang.String columnName)
Get a View Column with the given name |
Column |
getColumnAt(int index)
Get a View Column at given position index |
java.util.Vector<java.lang.String> |
getColumnIDs()
Get all View Column internal ids |
java.util.Vector<java.lang.String> |
getColumnNames()
Get all View Column names |
int |
getColumnPos(java.lang.String columnName)
Get the Column position inside the View |
java.util.Vector<Column> |
getColumns()
Get all View Columns |
java.lang.String |
getColumnsAsString(java.lang.String delim)
Get all View Column names as a single string |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this View object with the settled properties |
java.lang.String |
getCreateCommand(boolean force,
boolean overwrite)
Return the OOQL command to create this View object with the settled properties |
static View |
getDefaultView()
Get the default view for Objects |
java.lang.String |
getFilterParameters()
Get the list of parameters used by Column extraction Program s |
java.lang.String |
getFormat()
Get the View format |
java.lang.String |
getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
Get a property for this View object by its OOQL identifier |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this View object with the modified properties. |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
java.lang.String |
getUser()
Get the User associated to this View |
java.util.Vector<ViewUserColumn> |
getUserColumns(ObjectObj rootObject,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all ViewUserColumn for which the framework User has the visibility for navigation of a root object |
java.util.Vector<ViewUserColumn> |
getUserColumns(java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get all ViewUserColumn for which the framework User has the visibility |
java.util.Vector<ViewUserColumn> |
getUserColumnsWithData(ObjectObj rootObject,
java.util.Vector<java.lang.Object> objects,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get data related to View-Columns for navigation |
java.util.Vector<ViewUserColumn> |
getUserColumnsWithData(java.util.Vector<java.lang.Object> objects,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Get data related to View-Columns for query result |
int |
getUserId()
Get the internal id of User associated to this View |
static java.util.Vector<java.lang.String> |
getUserViews(Framework framework)
Get the framework User views. |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the View object: connect the memory instance with the database instance |
void |
moveColumn(java.lang.String columnName,
boolean after)
Move a View Column |
static View |
open(java.lang.String name,
Framework framework)
Open a general View and read its properties from the database |
static View |
open(java.lang.String name,
java.lang.String userName,
Framework framework)
Open a View for a given user and read its properties from the database |
static View |
open(java.lang.String name,
java.lang.String userName,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open a View for a given user and read its properties from the database |
void |
removeColumn(Column column)
Remove a Column from the View |
void |
removeColumn(java.lang.String columnName)
Remove a Column from the View |
void |
setColumns(java.util.Vector<Column> columns)
Set all View Columns |
void |
setFilterParameters(java.lang.String parameters)
Set a list of parameters used by Column extraction Program s |
void |
setFormat(java.lang.String format)
Set the View format. |
void |
setUser(java.lang.String userName)
Set the User associated to this View |
void |
setUserId(int userID)
Set the internal id of User associated to this View |
java.lang.String |
toString()
Return the View object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the View object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the View object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the View object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
updateColumns(java.util.Vector<Column> columns)
Update the columns on the basis of a given list |
void |
write(boolean force,
Framework framework)
Update the View object to the database |
void |
write(Framework framework)
Update the View object to the database |
Methods inherited from class com.oberon.ooql.sdk.OBBase |
---|
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_VIEW
public static final java.lang.String[] vDefaultNames
public static final java.lang.String[] vDefaultFields
Constructor Detail |
---|
public View()
public View(java.lang.String name) throws OberonException
name
- the View name
OberonException
- if the name contains invalid characterspublic View(java.lang.String name, java.lang.String userName) throws OberonException
name
- the View nameuserName
- the User
name
OberonException
- if the name contains invalid charactersMethod Detail |
---|
public static View open(java.lang.String name, Framework framework) throws OberonException
name
- the View nameframework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic static View open(java.lang.String name, java.lang.String userName, Framework framework) throws OberonException
name
- the View nameuserName
- the User
nameframework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic static View open(java.lang.String name, java.lang.String userName, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
name
- the View nameuserName
- the User
nameframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic static View getDefaultView() throws OberonException
OberonException
public void link(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
link
in class AdminBase
framework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void create(Framework framework) throws OberonException
create
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void create(boolean overwrite, boolean force, Framework framework) throws OberonException
overwrite
- if true overwrite the View when it already existsforce
- if true ignores optional featuresframework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void write(Framework framework) throws OberonException
write
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void write(boolean force, Framework framework) throws OberonException
force
- if true ignores optional featuresframework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void compose(java.util.Vector<java.lang.Object> objects, Selector selector, java.io.DataOutputStream outStream, Framework framework) throws java.io.IOException, OberonException
objects
- vector of objects; each element can be:ObjectObj
IDObjectObj
as result of a queryselector
- selection parameters and input argumentsoutStream
- the stream for the results (if null the result is stored into the framework)framework
- the current framework
java.io.IOException
- when the output stream return an exception
OberonException
- for all other problemsgetUserColumns(Vector, Framework)
,
getUserColumnsWithData(Vector, Vector, Framework)
,
Framework.getResult()
public void compose(ObjectObj rootObject, java.util.Vector<java.lang.Object> objects, Selector selector, java.io.DataOutputStream outStream, Framework framework) throws java.io.IOException, OberonException
rootObject
- the navigation root element whose properties are used to filter columns on the basis of filter parametersobjects
- vector of objects; each element can be:ObjectObj
and Link
IDsObjectObj
navigationselector
- selection parameters and input argumentsoutStream
- the stream for the results (if null the result is stored into the framework)framework
- the current framework
java.io.IOException
- when the output stream return an exception
OberonException
- for all other problemsgetUserColumns(Vector, Framework)
,
getUserColumnsWithData(Vector, Vector, Framework)
,
Framework.getResult()
public void unlink(Framework framework) throws OberonException
unlink
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void destroy(Framework framework) throws OberonException
destroy
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void setUser(java.lang.String userName)
User
associated to this View
public java.lang.String getUser()
User
associated to this View
public void setUserId(int userID)
User
associated to this View
public int getUserId()
User
associated to this View
public void setFilterParameters(java.lang.String parameters)
Column
extraction Program
s
parameters
- OOQL parameters space separatedpublic java.lang.String getFilterParameters()
Column
extraction Program
s
public void setFormat(java.lang.String format) throws OberonException
OberonException
public java.lang.String getFormat()
public int getColumnPos(java.lang.String columnName)
columnName
- the Column
namepublic void addColumn(Column column) throws OberonException
Column
to the View
OberonException
public void addColumnBefore(Column column, java.lang.String refColumn) throws OberonException
column
- the Column
to addrefColumn
- the reference Column name
OberonException
- when the reference Column is not foundpublic void addColumnAfter(Column column, java.lang.String refColumn) throws OberonException
column
- the Column
to addrefColumn
- the reference Column name
OberonException
- when the reference Column is not foundpublic void moveColumn(java.lang.String columnName, boolean after)
columnName
- the Column
nameafter
- if true move the Column after else move it before the current positionpublic void removeColumn(Column column)
Column
from the View
public void removeColumn(java.lang.String columnName)
Column
from the View
public void setColumns(java.util.Vector<Column> columns)
columns
- a vector of Column
spublic void updateColumns(java.util.Vector<Column> columns) throws OberonException
columns
- list of Column
s
OberonException
public java.util.Vector<Column> getColumns()
Column
spublic Column getColumnAt(int index)
Column
at given position index
public Column getColumn(java.lang.String columnName)
Column
with the given name
public Column getColumn(int columnId)
Column
with the given internal id
public java.util.Vector<java.lang.String> getColumnNames()
Column
namespublic java.util.Vector<java.lang.String> getColumnIDs()
Column
internal ids
public java.lang.String getColumnsAsString(java.lang.String delim)
Column
names as a single string
delim
- the colum name separatorpublic java.util.Vector<Column> getAccessColumns(int accessType, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
Column
for which the framework User
has access
accessType
- the access type ( Column.COLUMNACCESS_SEEABLE
/ Column.COLUMNACCESS_MODIFIABLE
)filterArgs
- input arguments used by the Column access Program
public java.util.Vector<java.lang.String> getAccessColumnNames(int accessType, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
Column
names for which the framework User
has access
accessType
- the access type ( Column.COLUMNACCESS_SEEABLE
/ Column.COLUMNACCESS_MODIFIABLE
)filterArgs
- input arguments used by the Column access Program
public static java.util.Vector<java.lang.String> getUserViews(Framework framework) throws java.lang.Exception
framework
- the current framework
View
names
java.lang.Exception
public java.lang.String getAccessColumnsAsString(int accessType, java.util.Vector<java.lang.Object> filterArgs, Framework framework, java.lang.String delim)
Column
names for which the framework User
has access as a single string
accessType
- the access type ( Column.COLUMNACCESS_SEEABLE
/ Column.COLUMNACCESS_MODIFIABLE
)filterArgs
- input arguments used by the Column access Program
delim
- the Column name separatorpublic java.util.Vector<ViewUserColumn> getUserColumns(java.util.Vector<java.lang.Object> filterArgs, Framework framework) throws OberonException
ViewUserColumn
for which the framework User
has the visibility
filterArgs
- input arguments used by the Column access Program
framework
- the current framework
ViewUserColumn
OberonException
public java.util.Vector<ViewUserColumn> getUserColumns(ObjectObj rootObject, java.util.Vector<java.lang.Object> filterArgs, Framework framework) throws OberonException
ViewUserColumn
for which the framework User
has the visibility for navigation of a root object
rootObject
- the navigation root element whose properties are used to filter columns on the basis of filter parametersfilterArgs
- input arguments used by the Column access Program
framework
- the current framework
ViewUserColumn
OberonException
public java.util.Vector<ViewUserColumn> getUserColumnsWithData(java.util.Vector<java.lang.Object> objects, java.util.Vector<java.lang.Object> filterArgs, Framework framework) throws OberonException
objects
- vector of objects; each element can be:ObjectObj
IDObjectObj
as result of a queryfilterArgs
- input arguments used by the Column access Program
framework
- the User framework
ViewUserColumn
OberonException
- usually due to DB SQL exceptionspublic java.util.Vector<ViewUserColumn> getUserColumnsWithData(ObjectObj rootObject, java.util.Vector<java.lang.Object> objects, java.util.Vector<java.lang.Object> filterArgs, Framework framework) throws OberonException
rootObject
- the navigation root element whose properties are used to filter columns on the basis of filter parametersobjects
- vector of objects; each element can be:ObjectObj
and Link
IDsfilterArgs
- input arguments used by the Column access Program
framework
- the User framework
ViewUserColumn
OberonException
- usually due to DB SQL exceptionspublic java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
getProperty
in class OBBase
propertyName
- OOQL property identifier/name (example: user , column ...)filterArgs
- extra arguments used to compute propertiestoken
- separator token for complex propertiesframework
- the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
getTargetNames
in class OBBase
composedName
- OOQL property identifier/name (example: column, column[colName], .. )filterArgs
- extra arguments used to compute propertiesframework
- the current framework
public java.lang.String toString()
toString
in class AdminBase
public java.lang.String toString(Framework framework)
toString
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(Framework framework)
toXML
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
toXML
in class AdminBase
fullDump
- true to include detailed informationframework
- the current frameworkgetImage
- true to include "imagedata" element with the base64 encoded image datapublic void fromXML(org.jdom.Element rootElement)
fromXML
in class AdminBase
public void fromXML(org.jdom.Element rootElement, boolean loadColumns)
loadColumns
- if true load the View Column
spublic java.lang.String getCreateCommand(boolean force)
getCreateCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getCreateCommand(boolean force, boolean overwrite)
overwrite
- if true add the overwrite option to the commandpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String compareUpdate(View refView, boolean checkImage, boolean overwrite, boolean force, Framework framework) throws OberonException
refView
- the reference View objectcheckImage
- if true compare also the image iconoverwrite
- if true update the database object instanceforce
- if true ignores optional propertiesframework
- the current framework
OberonException
fromXML(Element)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |