|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.database.Row | +--planetj.dataengine.PropertyRow | +--planetj.dataengine.operation.Operation
Represents an operation that can be executed. An operation may be contained in an Application, or may run independent of any Application. Note that a single Operation object is often shared by multiple users of an Application, so user specific data should not be stored in an Operation.
Nested Class Summary |
Nested classes inherited from class planetj.database.Row |
Row.SpacingRow |
Field Summary | |
static String |
className
Class name. |
Fields inherited from class planetj.database.Row |
COPY, DELETE, INSERT, MODE_COPY, MODE_DELETE, MODE_INSERT, MODE_READ, MODE_SEARCH, MODE_UNKNOWN, MODE_UPDATE, READ, UPDATE |
Fields inherited from interface planetj.dataengine.security.IGuarded |
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED |
Constructor Summary | |
Operation()
|
Method Summary | |
IMagicRequest |
createMagicRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a MagicRequest for viewing this operation. |
IMagicRequest |
createMagicRequest(String id,
Field basedOnField,
Row basedOnRow,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a MagicRequest for viewing this operation. |
IMagicRequest |
createMagicRequest(String id,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a MagicRequest for viewing this operation. |
IMagicRequest |
createMagicRequest(String id,
Row basedOnRow,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a MagicRequest for viewing this operation. |
Row |
createRow(Row row)
Initializes this SQLOperation as it is retrieved from the DB |
Object |
execute(ExecutingContext ec)
Executes this operation from the given executing context and Field. |
Object |
execute(ExecutingContext ec,
Field field)
Executes this operation from the given executing context and Field. |
Object |
execute(ExecutingContext ed,
Row row)
Executes this operation from the given executing context and Row. |
Application |
getApplication()
Gets the Application assoicated with this Operation (may be null if there is no such application). |
int |
getApplicationId()
Gets the ID of this SQLOperation's Application |
Integer |
getApplicationIdAsInteger()
Gets the ID of this SQLOperation's Application |
int |
getAutoRunId()
Gets the autorun ID of this SQLOperation |
AutoRunOperation |
getAutoRunOperation()
Get this operation's auto-run operation, which describes how and if this operation should be automatically run. |
int |
getAutoRunStatus()
Gets the autorun status of this operation. |
RowCollection |
getChildren()
Gets the children Operations of this Operation (may be null if Operation does not have any children) |
String |
getConnectionAlias()
Get the alias of the system where this Operation's data is located. |
String |
getDefaultOperationCode()
Return a default string to use on the operation field. |
String |
getDeleteConfirmationMessage()
Get the message used when deleting an operation. |
RowCollection |
getDependants()
Gets the dependant Operations of this Operation (may be null if Operation does not have any children) |
Operation |
getDependsOn()
Gets the Operation this Operation depends on (may be null if Operation does not depend on another Operation) |
int |
getDependsOnId()
Get the id of the Operation this Operation depends on. |
Integer |
getDependsOnIdAsInteger()
Get the id of the Operation this Operation depends on. |
String |
getDetailsJspFile()
Gets the JSP used to display this SQLOperation's details |
List |
getDisplayColumns()
Gets the display columns as Strings in a List |
String |
getDisplayColumnsAsString()
Gets the display columns, separated by commas in a String |
String[] |
getDisplayColumnsAsStringArray()
Gets the display columns as Strings in an Array. |
int |
getDisplayOrder()
Gets this SQLOperation's display order. |
int |
getId()
Gets the id of this Operation |
Integer |
getIdAsInteger()
Gets the id of this operation. |
String |
getInstructions()
Gets this SQLOperation's instructions |
String |
getJspFile()
Gets this SQLOperation's JSP file |
String |
getLabel()
Gets the label for this SQLOperation . |
LayoutDisplayPropertyGroup |
getLayoutProperties()
Gets this Operation's layout properties. |
IOperationContext |
getNewContext()
Gets a new IOperationContext for this operation. |
static Class |
getOperationClass(int operationType)
Gets the Operation java class which should be used to represent an operation of the specified type |
String |
getOperationCode()
Gets this SQLOperation's SQL |
String |
getOperationSetName()
Gets this SQLOperation's operation set name. |
String |
getOutputAlias()
Gets this SQLOperation's Output Alias |
int |
getOwnerId()
Gets the owner ID of this SQLOperation |
Field |
getOwnerIdField()
Returns the Owner Id Field |
Operation |
getParent()
Gets the parent Operation of this Operation (may be null if Operation does not have a parent) |
int |
getParentId()
Get the parent id of this Operation. |
Integer |
getParentIdAsInteger()
Get the parent id of this operation. |
String |
getPropertyFieldName()
Get the name of the Field containing this Row's properties.. |
Class |
getRowClass()
Gets the Row class to use when this SQLOperation's query is run (may be null) |
String |
getRowClassName()
Gets the name of the Row class to use when this SQLOperation's query is run (may be null) |
Class |
getRowCollectionClass()
Gets the RowCollection class to use when this SQLOperation's query is run (may be null) |
String |
getRowCollectionClassName()
Gets the name of the RowCollection class to use when this SQLOperation's query is run (may be null) |
int |
getRowCount()
Gets the row count to use when retrieving rows for this SQLOperation |
PropertyGroupList |
getRowPropertyGroups()
Gets this SQLOperation's operation set name. |
int |
getSecurityId()
Gets the security ID of this SQLOperation |
int |
getSecurityType()
Check whether this Operation is protected (secured) |
int |
getType()
Gets the type of this Operation. |
int |
getUsageId()
Gets the usageId of the field. |
String |
getUserMessageForOperation(int pMode)
Returns a message for the user based on the Mode of the Row |
boolean |
hasDependants()
Tests to see if this Operation has any dependant operations. |
int |
insert(SQLContext context)
Inserts this Row into its table. |
boolean |
isAllowDeletes()
Tests whether or not rows can be deleted from this results of this SQLOperation if this SQLOperation is a query |
boolean |
isAllowDetails()
Tests whether or not the details of a row in this ListView can be viewed |
boolean |
isAllowInserts()
Tests whether or not rows can be inserted into the results of this SQLOperation |
boolean |
isAllowUpdates()
Tests whether or not the results of this SQLOperation can be updated, if this SQLOperation is a query |
boolean |
isAssociation()
Check if this Operation is an association. |
boolean |
isAuthentication()
Test if this SQLOperation is a Authentication type. |
boolean |
isAuthorizedForExecution(Row pRow,
ExecutingContext pEc)
Test for authority to execute this operation. |
boolean |
isAutoPopulate()
Test if this SQLOperation is an Auto Populate. |
boolean |
isAutoRunOperation()
Tests if this operation is an autorun operation. |
boolean |
isBlobDownload()
Test if this SQLOperation is a Blob Download. |
boolean |
isChild()
Test to see if this Operation has a parent Operation. |
boolean |
isContextCurrent(IOperationContext context)
Test if the context was created from this operation, and if the contents of the context are still valid. |
boolean |
isDependant()
Test to see if this Operation depends on another Operation. |
boolean |
isDisplayable(ExecutingContext pEc)
Test if this SQLOperation is displayable |
boolean |
isExecutionGroup()
Check to see if this operation is an execution group. |
boolean |
isFileUpload()
Test if this SQLOperation is a File Upload. |
boolean |
isHtml()
Tests if this operation is an HTML operation |
boolean |
isHTMLAssociation()
Check if this Operation is an HTML assocation type. |
boolean |
isHtmlCode()
Check to see if this operation is HTML code. |
boolean |
isHtmlReference()
Check to see if this operation is a HTML reference. |
boolean |
isHtmlReferenceAssociation()
Check to see if this operation is an HTML reference association. |
boolean |
isJava()
Tests if this operation is an Java operation |
boolean |
isJavaAssociation()
Check to see if this operation is a Associated Java Operation |
boolean |
isJSPReference()
Check to see if this operation is a JSP reference. |
boolean |
isOneToManyAssociation()
Test if this SQLOperation is a 1-Many association. |
boolean |
isOneToOneAssociation()
Test if this SQLOperation is a 1-1 association. |
boolean |
isParent()
Test to see if this Operation has any children Operations. |
boolean |
isPossibleValues()
Test if this SQLOperation is a Possible Values type. |
boolean |
isPossibleValuesSearch()
Test if this SQLOperation is a Possible Values Search type. |
boolean |
isPossibleValuesSelector()
Test if this SQLOperation is a PossibleValuesSelector. |
boolean |
isSQL()
Test if this SQLOperation is a SQL type. |
boolean |
isSQLAssociation()
Test if this SQLOperation is a Association type. |
boolean |
isUserAuthenticationListOperation()
Test if this SQLOperation is a User Authentication List Operation type. |
boolean |
isUserAuthorizationListOperation()
Test if this SQLOperation is a User Authorization List Operation type. |
boolean |
isUserAuthorizationOperation()
Test if this SQLOperation is a User Authorization Operation type. |
boolean |
isUserPromptingRequired()
Does the user need to be prompted for input. |
void |
setDefaultOperationCode()
Sets the default operation code for this operation instance. |
void |
setDisplayColumns(List cols)
Sets the display columns as Strings in a List |
void |
setDisplayColumns(String value)
Sets this display columns for this SQLOperation as a String, containing the column names separated by commas |
void |
setDisplayColumns(String[] cols)
Sets the display columns as Strings in an Array |
void |
setId(int value)
Sets the id of this Operation |
void |
setId(Integer value)
Sets the id of this Operation |
void |
setRowClass(Class newRowClass)
Sets the Java class to use when retrieving this SQLOperation's rows |
void |
setRowClassName(String rowClass)
Sets the Java class to use when retrieving this SQLOperations's rows |
void |
setRowCollectionClass(Class newRowCollectionClass)
Sets the Java class to use when retrieving this SQLOperation's row collection |
void |
setRowCollectionClassName(String rowCollectionClass)
Sets the Java class to use when retrieving this SQLOperation's row collection |
void |
setRowCount(int value)
Sets this SQLOperation's row count |
void |
setUsageId(int usageid)
Gets the usageId of the field. |
Row |
statusChanged(Field pField,
ExecutingContext ec)
Invoked when a status change takes place on of this Row's fields. |
String |
toString()
Returns a String representation of this Row. |
int |
update(Connection conn,
ExecutingContext ec)
Updates the database with the values in this Row. |
boolean |
validate(ExecutingContext ec)
Validate this Row based on it's configuration and field values. |
Methods inherited from class planetj.dataengine.PropertyRow |
getProperties, getRowPropertyGroup, getRowPropertyGroups, setProperties, transferDataTo |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String className
Constructor Detail |
public Operation()
Method Detail |
public String getDeleteConfirmationMessage()
getDeleteConfirmationMessage
in class Row
public IMagicRequest createMagicRequest(String id, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public IMagicRequest createMagicRequest(String id, Field basedOnField, Row basedOnRow, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws CMException
CMException
public IMagicRequest createMagicRequest(String id, Row basedOnRow, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws CMException
CMException
public IMagicRequest createMagicRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public Row createRow(Row row) throws CMException
createRow
in interface IRowCreator
createRow
in class PropertyRow
row
- A Row containing data read from the database (it will always be equal to this)
CMException
public Object execute(ExecutingContext ec) throws CMException
ec
- ExecutingContext in which to execute this Operation
CMException
public Object execute(ExecutingContext ec, Field field) throws CMException
ec
- ExecutingContext in which to execute this Operationfield
- Field containing a value and Row with values that may
be used in execution of this Operation
CMException
public Object execute(ExecutingContext ed, Row row) throws CMException
row
- Row containing values that may be used in
execution of this Operation
CMException
public Application getApplication() throws CMException
CMException
public int getApplicationId()
public Integer getApplicationIdAsInteger()
public int getAutoRunStatus()
public int getAutoRunId()
public AutoRunOperation getAutoRunOperation() throws CMException
CMException
public RowCollection getChildren() throws CMException
getChildren
in class Row
CMException
public String getConnectionAlias()
public String getDefaultOperationCode()
public RowCollection getDependants() throws CMException
CMException
public Operation getDependsOn() throws CMException
CMException
public int getDependsOnId()
public Integer getDependsOnIdAsInteger()
public String getDetailsJspFile()
public List getDisplayColumns()
public String getDisplayColumnsAsString()
public String[] getDisplayColumnsAsStringArray()
public int getDisplayOrder()
public int getId()
public Integer getIdAsInteger()
public String getInstructions()
public String getJspFile()
public String getLabel()
public LayoutDisplayPropertyGroup getLayoutProperties()
public final IOperationContext getNewContext() throws CMException
CMException
public static Class getOperationClass(int operationType)
public String getOutputAlias()
public String getOperationCode()
public String getOperationSetName()
public int getOwnerId()
public Field getOwnerIdField()
IOwner
public Operation getParent() throws CMException
CMException
public int getParentId()
public Integer getParentIdAsInteger()
public String getPropertyFieldName()
getPropertyFieldName
in class PropertyRow
public Class getRowClass()
public String getRowClassName()
public Class getRowCollectionClass()
public String getRowCollectionClassName()
public int getRowCount()
public PropertyGroupList getRowPropertyGroups()
getRowPropertyGroups
in class PropertyRow
public int getSecurityId()
public int getSecurityType()
getSecurityType
in interface IGuarded
getSecurityType
in class Row
public int getType()
public int getUsageId()
public String getUserMessageForOperation(int pMode)
getUserMessageForOperation
in class Row
(see Row constants to find the modes.
public boolean hasDependants() throws CMException
CMException
public int insert(SQLContext context) throws CMException
insert
in class PropertyRow
CMException
public boolean isAllowDeletes()
public boolean isAllowDetails()
public boolean isAllowInserts()
public boolean isAllowUpdates()
public boolean isAssociation()
public boolean isAuthentication()
public boolean isAuthorizedForExecution(Row pRow, ExecutingContext pEc) throws CMException
CMException
public boolean isAutoPopulate()
public boolean isAutoRunOperation()
public boolean isBlobDownload()
public boolean isChild()
public boolean isContextCurrent(IOperationContext context) throws CMException
CMException
public boolean isDependant() throws CMException
CMException
public boolean isDisplayable(ExecutingContext pEc)
public boolean isExecutionGroup()
public boolean isFileUpload()
public boolean isHtml()
public boolean isHTMLAssociation()
public boolean isHtmlCode()
public boolean isHtmlReference()
public boolean isHtmlReferenceAssociation()
public boolean isJava()
public boolean isJavaAssociation()
public boolean isJSPReference()
public boolean isOneToManyAssociation()
public boolean isOneToOneAssociation()
public boolean isParent() throws CMException
CMException
public boolean isPossibleValues()
public boolean isPossibleValuesSearch()
public boolean isPossibleValuesSelector()
public boolean isSQL()
public boolean isSQLAssociation()
public boolean isUserAuthenticationListOperation()
public boolean isUserAuthorizationListOperation()
public boolean isUserAuthorizationOperation()
public boolean isUserPromptingRequired() throws CMException
CMException
public void setDefaultOperationCode() throws CMException
CMException
public void setDisplayColumns(String[] cols) throws CMException
CMException
public void setDisplayColumns(String value) throws CMException
CMException
public void setDisplayColumns(List cols) throws CMException
CMException
public void setId(int value) throws CMException
CMException
public void setId(Integer value) throws CMException
CMException
public void setRowClass(Class newRowClass) throws CMException
CMException
public void setRowClassName(String rowClass) throws CMException
CMException
public void setRowCollectionClass(Class newRowCollectionClass) throws CMException
CMException
public void setRowCollectionClassName(String rowCollectionClass) throws CMException
CMException
public void setRowCount(int value) throws CMException
CMException
public void setUsageId(int usageid) throws CMException
CMException
public Row statusChanged(Field pField, ExecutingContext ec) throws CMException
statusChanged
in class Row
pField
- The field whose status has changedec
- The current executing context
CMException
public String toString()
toString
in class Object
public int update(Connection conn, ExecutingContext ec) throws CMException
update
in class PropertyRow
conn
- The connection to use for the update
CMException
public boolean validate(ExecutingContext ec) throws CMException
validate
in class Row
ec
- current context in which application is executing
CMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |