com.ragic.s3.service.workflow
Class ScriptPostflowParameter

java.lang.Object
  extended by com.ragic.s3.service.workflow.ScriptPostflowParameter
All Implemented Interfaces:
ScriptParameter

public class ScriptPostflowParameter
extends java.lang.Object
implements ScriptParameter

ScriptPostflowParameter is an implementation of ScriptParameter in Ragic post-workflow.

User: liberation
Date: 2010/10/5
Time: 11:07:06 am


Constructor Summary
ScriptPostflowParameter(com.ragic.s3.sdb.data.bdb.summary.SummarySubtree t, com.ragic.s3.sdb.data.bdb.BDBWorker worker)
          For internal use only.
 
Method Summary
 int getNewNodeId(int domainId)
          Returns the node ID of given field after new value being written.
 java.util.List<java.lang.Integer> getNewNodeIds(int domainId)
          Similar to getNewNodeId, but can access multiple IDs at the same time, which is useful when dealing with multiple-selection fields.
 java.lang.String getNewValue(int domainId)
          Returns the value of given field after new value being written.
Returned value should be the same value as getOldNodeId if no change submitted.
 java.util.List<java.lang.String> getNewValues(int domainId)
          Similar to getNewValue, but can access multiple values at the same time, which is useful when dealing with multiple-selection fields.
 int getOldNodeId(int domainId)
          Returns the node ID of given field before new value being written.
 java.util.List<java.lang.Integer> getOldNodeIds(int domainId)
          Similar to getOldNodeId, but can access multiple IDs at the same time, which is useful when dealing with multiple-selection fields.
 java.lang.String getOldValue(int domainId)
          Returns the value of given field before new value being written.
 java.util.List<java.lang.String> getOldValues(int domainId)
          Similar to getOldValue, but can access multiple values at the same time, which is useful when dealing with multiple-selection fields.
 java.lang.String getOperationType(int domainId)
           
 java.util.List<ScriptParameter> getSubtableEntry(int domainId)
          Returns a list of ScriptParameters which can manipulated each record in the subtale.
With toArray() every item in list can be called by each index, which is recommended.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptPostflowParameter

public ScriptPostflowParameter(com.ragic.s3.sdb.data.bdb.summary.SummarySubtree t,
                               com.ragic.s3.sdb.data.bdb.BDBWorker worker)
For internal use only.

Method Detail

getNewNodeId

public int getNewNodeId(int domainId)
Description copied from interface: ScriptParameter
Returns the node ID of given field after new value being written. Returned value will be the same value as getOldNodeId if no change submitted.

Specified by:
getNewNodeId in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
node ID after new value being written

getOldNodeId

public int getOldNodeId(int domainId)
Description copied from interface: ScriptParameter
Returns the node ID of given field before new value being written. Usually used for selection or multiple selection, because each choice in a selection list is a single node.

Specified by:
getOldNodeId in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
node ID before new value being written

getNewNodeIds

public java.util.List<java.lang.Integer> getNewNodeIds(int domainId)
Description copied from interface: ScriptParameter
Similar to getNewNodeId, but can access multiple IDs at the same time, which is useful when dealing with multiple-selection fields.

Specified by:
getNewNodeIds in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
a list of field IDs after new data being written into database.
See Also:
ScriptParameter.getNewNodeId(int)

getOldNodeIds

public java.util.List<java.lang.Integer> getOldNodeIds(int domainId)
Description copied from interface: ScriptParameter
Similar to getOldNodeId, but can access multiple IDs at the same time, which is useful when dealing with multiple-selection fields.

Specified by:
getOldNodeIds in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
a list of node IDs before new data being written into database.
See Also:
ScriptParameter.getOldNodeId(int)

getNewValue

public java.lang.String getNewValue(int domainId)
Description copied from interface: ScriptParameter
Returns the value of given field after new value being written.
Returned value should be the same value as getOldNodeId if no change submitted. Also, null value can occur if the field is left blank.

Specified by:
getNewValue in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
field value after new value being written

getOldValue

public java.lang.String getOldValue(int domainId)
Description copied from interface: ScriptParameter
Returns the value of given field before new value being written. Returned value should be the same value as getNewNodeId if no change submitted. Also, null value can occur if the field is left blank.

Specified by:
getOldValue in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
field value before new value being written

getNewValues

public java.util.List<java.lang.String> getNewValues(int domainId)
Description copied from interface: ScriptParameter
Similar to getNewValue, but can access multiple values at the same time, which is useful when dealing with multiple-selection fields.

Specified by:
getNewValues in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
a list of field values after new data being written into database.
See Also:
ScriptParameter.getNewValue(int)

getOldValues

public java.util.List<java.lang.String> getOldValues(int domainId)
Description copied from interface: ScriptParameter
Similar to getOldValue, but can access multiple values at the same time, which is useful when dealing with multiple-selection fields.

Specified by:
getOldValues in interface ScriptParameter
Parameters:
domainId - field ID of interest
Returns:
a list of field values before new data being written into database.
See Also:
ScriptParameter.getOldValue(int)

getOperationType

public java.lang.String getOperationType(int domainId)
Specified by:
getOperationType in interface ScriptParameter
Returns:
"I", if data of this field are just created.
"M", if the data of this field are created before and are just revised.

getSubtableEntry

public java.util.List<ScriptParameter> getSubtableEntry(int domainId)
Description copied from interface: ScriptParameter
Returns a list of ScriptParameters which can manipulated each record in the subtale.
With toArray() every item in list can be called by each index, which is recommended.

Specified by:
getSubtableEntry in interface ScriptParameter
Parameters:
domainId - the root field ID of the subtable
Returns:
a list of ScriptParameter which can be used to manipulate each record in subtable


Copyright © 2009,2010,2011,2012 Ragic Corp. All Rights Reserved.