public class SignatureUtils
extends java.lang.Object
This class also contains methods that simplifies work with signatures from a
datahandler or entry processor
used in tables.
Look at this example:
public void prepareEvaluation(Column column, EvaluationInput input) {
SignatureUtils.prepareEvaluation(input, false);
}
public void populateCell(Cell cell, EvaluatedData data) {
Iterator itr = SignatureUtils.getCurrentSignatures(data);
while (itr.hasNext()) {
Signature s = (Signature) itr.next();
// doSomeThing(s);
}
}
OR, use this (slightly faster; less class instantiations...)
public void prepareEvaluation(Column column, EvaluationInput input) {
SignatureUtils.prepareEvaluation(input, false);
}
public void populateCell(Cell cell, EvaluatedData data) {
Signature s = new Signature();
Iterator itr = SignatureUtils.getCurrentSignatures(s, data);
while (itr.hasNext()) {
itr.next();
// "s" is updated upon each iteration (the instance is reused).
// doSomeThing(s);
}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
SignatureUtils.Signature
Contains status about a single signature for a particular businessobject
in a certain state.
|
| Modifier and Type | Field and Description |
|---|---|
static Statement |
CURRENT_SIGNATURE |
static Statement |
CURRENT_SIGNATURE_APPROVED |
static Statement |
CURRENT_SIGNATURE_COMMENT |
static Statement |
CURRENT_SIGNATURE_HASAPPROVE |
static Statement |
CURRENT_SIGNATURE_HASIGNORE |
static Statement |
CURRENT_SIGNATURE_HASREJECT |
static Statement |
CURRENT_SIGNATURE_IGNORED |
static Statement |
CURRENT_SIGNATURE_REJECTED |
static Statement |
CURRENT_SIGNATURE_SATISFIED |
static Statement |
CURRENT_SIGNATURE_SIGNED |
static Statement |
CURRENT_SIGNATURE_SIGNER |
static Statement |
STATE_SIGNATURE |
static Statement |
STATE_SIGNATURE_APPROVED |
static Statement |
STATE_SIGNATURE_COMMENT |
static Statement |
STATE_SIGNATURE_HASAPPROVE |
static Statement |
STATE_SIGNATURE_HASIGNORE |
static Statement |
STATE_SIGNATURE_HASREJECT |
static Statement |
STATE_SIGNATURE_IGNORED |
static Statement |
STATE_SIGNATURE_REJECTED |
static Statement |
STATE_SIGNATURE_SATISFIED |
static Statement |
STATE_SIGNATURE_SIGNED |
static Statement |
STATE_SIGNATURE_SIGNER |
| Constructor and Description |
|---|
SignatureUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
approve(java.lang.String objectId,
java.lang.String signatureName,
java.lang.String comment)
Approves a signature.
|
static java.util.Iterator<SignatureUtils.Signature> |
getAllSignatures(SelectedData data) |
static java.util.Iterator<SignatureUtils.Signature> |
getAllSignatures(SignatureUtils.Signature signature,
SelectedData data) |
static java.util.Iterator<SignatureUtils.Signature> |
getCurrentSignatures(SelectedData data) |
static java.util.Iterator<SignatureUtils.Signature> |
getCurrentSignatures(SignatureUtils.Signature signature,
SelectedData data) |
static SignatureUtils.Signature[] |
getSignatures(java.lang.String objectId)
Returns all signatures available in the current state for the given
object.
|
static void |
ignore(java.lang.String objectId,
java.lang.String signatureName,
java.lang.String comment)
Ignores a signature
|
static void |
prepareEvaluation(EvaluationInput input,
boolean all)
Convenient method for preparing a evaluation in a table, when there is a
need to obtain signature information.
|
static void |
reject(java.lang.String objectId,
java.lang.String signatureName,
java.lang.String comment)
Rejects a signature.
|
public static final Statement STATE_SIGNATURE
public static final Statement STATE_SIGNATURE_COMMENT
public static final Statement STATE_SIGNATURE_SIGNER
public static final Statement STATE_SIGNATURE_SIGNED
public static final Statement STATE_SIGNATURE_APPROVED
public static final Statement STATE_SIGNATURE_REJECTED
public static final Statement STATE_SIGNATURE_IGNORED
public static final Statement STATE_SIGNATURE_HASAPPROVE
public static final Statement STATE_SIGNATURE_HASREJECT
public static final Statement STATE_SIGNATURE_HASIGNORE
public static final Statement STATE_SIGNATURE_SATISFIED
public static final Statement CURRENT_SIGNATURE
public static final Statement CURRENT_SIGNATURE_COMMENT
public static final Statement CURRENT_SIGNATURE_SIGNER
public static final Statement CURRENT_SIGNATURE_SIGNED
public static final Statement CURRENT_SIGNATURE_APPROVED
public static final Statement CURRENT_SIGNATURE_REJECTED
public static final Statement CURRENT_SIGNATURE_IGNORED
public static final Statement CURRENT_SIGNATURE_HASAPPROVE
public static final Statement CURRENT_SIGNATURE_HASREJECT
public static final Statement CURRENT_SIGNATURE_HASIGNORE
public static final Statement CURRENT_SIGNATURE_SATISFIED
public static void approve(java.lang.String objectId,
java.lang.String signatureName,
java.lang.String comment)
throws TVCException
objectId - signatureName - comment - TVCExceptionpublic static void reject(java.lang.String objectId,
java.lang.String signatureName,
java.lang.String comment)
throws TVCException
objectId - signatureName - comment - TVCExceptionpublic static void ignore(java.lang.String objectId,
java.lang.String signatureName,
java.lang.String comment)
throws TVCException
objectId - signatureName - comment - TVCExceptionpublic static SignatureUtils.Signature[] getSignatures(java.lang.String objectId) throws TVCException
Note that this method returns all signatures for the current state, even though there might exist branches. I.e. some signatures might lead to one state, while some other signatures might lead to another state.
If you need information what states a signature actually is targetting
to, the you should get that information from the
PolicyInfo.getStateInfo(String) method.
objectId - signatures available in the
current state for the given objectTVCExceptionpublic static java.util.Iterator<SignatureUtils.Signature> getCurrentSignatures(SelectedData data)
data - signaturespublic static java.util.Iterator<SignatureUtils.Signature> getCurrentSignatures(SignatureUtils.Signature signature, SelectedData data)
signature - data - signaturespublic static java.util.Iterator<SignatureUtils.Signature> getAllSignatures(SelectedData data)
public static java.util.Iterator<SignatureUtils.Signature> getAllSignatures(SignatureUtils.Signature signature, SelectedData data)
signature - If this parameter is null, then a new SignatureUtils.Signature
instance is created upon each iteration. If non-null, then the
same signature instance is reused over and over again.data - The selected data.public static void prepareEvaluation(EvaluationInput input, boolean all)
input - The EvaluationInputall - True if all signatures, independent of the current state of
the object, should be retreived - or false, if only the signatures
in the current state is of interest.Copyright ? Technia AB. All Rights Reserved.