public final class BusinessObjectUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
changeAltOwner1(java.lang.String objectId,
java.lang.String newValue) |
static void |
changeAltOwner2(java.lang.String objectId,
java.lang.String newValue) |
static matrix.db.BusinessObject |
changeName(matrix.db.BusinessObject bo,
java.lang.String newName)
Change the name of the businessobject.
|
static void |
changeName(java.lang.String objectId,
java.lang.String newValue) |
static void |
changeOwner(matrix.db.BusinessObject bo,
java.lang.String owner)
Change the owner of the businessobject.
|
static void |
changeOwner(java.lang.String objectId,
java.lang.String newValue) |
static void |
changePolicy(java.lang.String objectId,
java.lang.String newValue) |
static void |
changeRevision(java.lang.String objectId,
java.lang.String newValue)
Tries to change the revision value of a business object.
|
static matrix.db.BusinessObject |
changeType(matrix.db.BusinessObject bo,
java.lang.String newType)
Changes the type of a businessobject.
|
static void |
changeType(java.lang.String objectId,
java.lang.String newValue)
Changes the type of a businessobject.
|
static void |
changeVault(java.lang.String objectId,
java.lang.String newValue) |
static void |
checkinFile(matrix.db.BusinessObject bo,
java.io.File file)
Check in a file on the businessobject.
|
static void |
checkinFile(matrix.db.BusinessObject bo,
java.io.File file,
java.lang.String format)
Check in a file on the businessobject.
|
static void |
checkinFile(matrix.db.BusinessObject bo,
java.io.File file,
java.lang.String format,
java.lang.String store,
java.lang.String host,
boolean unlock,
boolean append)
Checks in the specified file into the businessobject.
|
static void |
checkinFile(java.lang.String objectId,
java.io.InputStream in,
java.lang.String fileName,
java.lang.String format,
java.lang.String store,
boolean unlock,
boolean append) |
static void |
checkinFileFromServer(java.lang.String objectId,
java.io.File file,
java.lang.String format,
java.lang.String store,
boolean unlock,
boolean append)
Performs a file checkin with a file from the server.
|
static java.io.OutputStream |
checkinOutputStream(java.lang.String objectId,
java.lang.String fileName,
java.lang.String format,
java.lang.String store,
boolean unlock,
boolean append)
Creates an OutputStream that can be used to checkin a file into a
business object.
|
static void |
checkoutFile(matrix.db.BusinessObject bo,
java.lang.String format,
java.lang.String file,
boolean lock,
java.io.OutputStream out)
Check out a file from the businessobject.
|
static void |
checkoutFile(matrix.db.BusinessObject bo,
java.lang.String format,
java.lang.String file,
boolean lock,
java.io.OutputStream out,
boolean closeStream)
Check out a file from the businessobject.
|
static void |
checkoutFile(java.lang.String objectId,
java.lang.String format,
java.lang.String file,
boolean lock,
java.io.OutputStream out)
Check out a file from the businessobject.
|
static java.io.InputStream |
checkoutInputStream(java.lang.String objectId,
java.lang.String format,
java.lang.String fileName,
boolean lock)
Creates an inputstream that can be used to read a file that has been
checked into matrix.
|
static void |
checkoutMultipleFiles(java.lang.String objectId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> formatFiles,
java.io.OutputStream os,
boolean lock)
Checkout and zip multiple files into Zip Output Stream that is passed as
argument
|
static matrix.db.BusinessObject |
clone(matrix.db.BusinessObject bo,
java.lang.String newName,
java.lang.String newRev,
java.lang.String newVault)
Create a copy of the businessobject.
|
static matrix.db.BusinessObject |
clone(matrix.db.BusinessObject bo,
java.lang.String newName,
java.lang.String newRev,
java.lang.String newVault,
matrix.db.AttributeList attributes)
Create a copy of the business object.
|
static matrix.db.Relationship |
connect(matrix.db.BusinessObject from,
matrix.db.BusinessObject to,
java.lang.String relationshipName)
Connects two objects using the specified relationship.
|
static matrix.db.Relationship |
connect(matrix.db.BusinessObject from,
matrix.db.BusinessObject to,
java.lang.String relationshipName,
matrix.db.AttributeList attributes)
Connects two objects using the specified relationship.
|
static matrix.db.Relationship |
connect(java.lang.String fromOID,
java.lang.String toOID,
java.lang.String relationshipName)
Connects two objects using the specified relationship.
|
static matrix.db.Relationship |
connect(java.lang.String fromOID,
java.lang.String toOID,
java.lang.String relationshipName,
matrix.db.AttributeList attributes)
Connects two objects using the specified relationship.
|
static java.lang.String[] |
convertBusList(matrix.db.BusinessObjectList bol)
Convert list of matrix.db.BusinessObject instances into an array of
businessobject IDs.
|
static java.lang.String[] |
convertBusList(matrix.db.BusinessObjectWithSelectList bowsl) |
static matrix.db.BusinessObjectList |
convertOidList(java.lang.String[] oid)
Convert an array of businessobject IDs into a list of
matrix.db.BusinessObject instances.
|
static int |
copyFiles(java.lang.String srcObjectId,
java.lang.String targetObjectId)
Copy files from one business object to another.
|
static int |
copyFiles(java.lang.String srcObjectId,
java.lang.String targetObjectId,
boolean append)
Copy files from one business object to another.
|
static matrix.db.BusinessObject |
create(matrix.db.BusinessObject bo,
java.lang.String policy,
java.lang.String owner,
matrix.db.AttributeList al)
Creates the business object within the database
|
static matrix.db.BusinessObject |
create(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
java.lang.String policy,
java.lang.String owner,
matrix.db.AttributeList al)
Create a new businessobject in the database.
|
static java.lang.String |
create(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
java.lang.String policy,
java.lang.String description,
java.lang.String owner,
java.lang.String organizationOwnership,
java.lang.String projectOwnership,
java.util.Map<java.lang.String,java.lang.String> attributes) |
static java.lang.StringBuffer |
debug(matrix.db.BusinessObjectWithSelect data)
Creates a string representation of the selected data from the
businessobject.
|
static void |
delete(matrix.db.BusinessObject object) |
static void |
delete(java.lang.String objectId) |
static void |
deleteFile(java.lang.String objectId,
java.lang.String fileName) |
static void |
deleteFile(java.lang.String objectId,
java.lang.String format,
java.lang.String fileName) |
static void |
demote(matrix.db.BusinessObject bo)
Demotes the businessobject to its previous state.
|
static void |
demote(java.lang.String objectId)
Demote the business object with the specified ID.
|
static boolean |
exists(matrix.db.BusinessObject bo)
Tests if a business object exists in the database.
|
static boolean |
exists(java.lang.String objectId)
This method allows checking if a business object with a specified ID
exists or not.
|
static boolean |
exists(java.lang.String type,
java.lang.String name,
java.lang.String revision)
Check if a business object exists.
|
static boolean |
exists(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault)
Check if a business object exists.
|
static matrix.db.Expansion |
expand(matrix.db.BusinessObject bo,
short level,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
matrix.db.Visuals visuals)
Expand a businessobject the specified number of levels.
|
static matrix.db.ExpansionWithSelect |
expandSelect(matrix.db.BusinessObject bo,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
int recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
Expand the businessobject with the specified conditions/constraints.
|
static matrix.db.ExpansionWithSelect |
expandSelect(matrix.db.BusinessObject bo,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
Expand the businessobject with the specified conditions/constraints.
|
static matrix.db.ExpansionWithSelect |
expandSelect(matrix.db.BusinessObject bo,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden)
Expand the businessobject with the specified conditions/constraints.
|
static matrix.db.ExpansionWithSelect |
expandSelect(java.lang.String objectId,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
int recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
Expand the businessobject with the specified conditions/constraints.
|
static matrix.db.ExpansionWithSelect |
expandSelect(java.lang.String objectId,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
Expand the businessobject with the specified conditions/constraints.
|
static java.util.Iterator<java.lang.String[]> |
expandToEnd(java.lang.String objectId,
java.lang.String relationshipPattern,
java.lang.String typePattern,
boolean getTo,
boolean getFrom,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause)
Expand the businessobject to the end with the specified
conditions/constraints.
|
static matrix.db.BusinessObjectList |
getAllRevisions(matrix.db.BusinessObject bo)
Returns a list with all revisions of the businessobject.
|
static matrix.db.AttributeList |
getAttributes(matrix.db.BusinessObject bo)
Returns a list of the attributes.
|
static java.lang.String |
getAttributeValue(matrix.db.BusinessObject bo,
java.lang.String attributeName)
Returns the value of the given attribute from the businessobject.
|
static java.lang.String |
getAttributeValue(java.lang.String objectId,
java.lang.String attributeName)
Returns the value of the given attribute from the businessobject.
|
static matrix.db.BusinessObjectBasics |
getBasics(matrix.db.BusinessObject bo)
Returns the basics of the specified businessobject.
|
static matrix.db.BusinessInterfaceList |
getBusinessInterfaces(matrix.db.BusinessObject bo)
Get a list of all BusinessInterfaces.
|
static matrix.db.BusinessInterfaceList |
getBusinessInterfaces(java.lang.String objectId)
Get a list of all BusinessInterfaces.
|
static matrix.db.State |
getCurrentState(matrix.db.BusinessObject bo)
Returns the current state of the businessobject.
|
static matrix.db.ExpansionIterator |
getExpansionIterator(matrix.db.BusinessObject bo,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden)
Returns an expansion iterator with the specified conditions/constraints.
|
static matrix.db.ExpansionIterator |
getExpansionIterator(matrix.db.BusinessObject bo,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden,
boolean preventDuplicates)
Returns an expansion iterator with the specified conditions/constraints.
|
static matrix.db.ExpansionIterator |
getExpansionIterator(java.lang.String objectId,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden)
Returns an expansion iterator with the specified conditions/constraints.
|
static matrix.db.ExpansionIterator |
getExpansionIterator(java.lang.String objectId,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden,
boolean preventDuplicates)
Returns an expansion iterator with the specified conditions/constraints.
|
static java.lang.String |
getFileFormat(java.lang.String objectId,
java.lang.String fileName)
Returns the format of a given filename
|
static matrix.db.File[] |
getFiles(matrix.db.BusinessObject bo)
Returns the files that are checked into the businessobject.
|
static matrix.db.File[] |
getFiles(java.lang.String objectId)
Returns the files that are checked into the businessobject.
|
static matrix.db.BusinessObject |
getFirstRevision(matrix.db.BusinessObject bo)
Returns the first revision of the businessobject.
|
static matrix.util.StringList |
getHistory(matrix.db.BusinessObject bo)
Returns the history of the businessobject.
|
static matrix.db.BusinessObject |
getLastRevision(matrix.db.BusinessObject bo)
Returns the last revision of the businessobject.
|
static java.lang.String |
getLatestRevisionInState(java.lang.String objectId,
java.lang.String stateName) |
static java.lang.String |
getLatestRevisionInState(java.lang.String objectId,
java.lang.String[] stateNames) |
static java.lang.String |
getNextSequence(matrix.db.BusinessObject bo)
Returns the next revision in the businessobjects revision sequence.
|
static java.lang.String |
getObjectId(matrix.db.BusinessObject object)
Returns the ID of the businessobject.
|
static java.lang.String |
getObjectId(java.lang.String type,
java.lang.String name,
java.lang.String rev,
java.lang.String vault)
Returns the ID of the business object.
|
static java.lang.String |
getOwner(matrix.db.BusinessObject bo)
Returns the owner of the businessobject.
|
static java.lang.String |
getOwner(java.lang.String objectId)
Returns the owner of the business object with the given id.
|
static matrix.db.Policy |
getPolicy(matrix.db.BusinessObject bo)
Returns the policy of the businessobject
|
static java.lang.String |
getPolicyName(matrix.db.BusinessObject bo)
Returns the name of the policy that currently governs this
businessobject.
|
static matrix.db.State |
getState(matrix.db.BusinessObject bo,
java.lang.String stateName)
Returns the state with the specified name.
|
static matrix.db.StateList |
getStates(matrix.db.BusinessObject bo)
Returns a list of all states for the businessobject.
|
static java.lang.String[] |
getTNR(matrix.db.BusinessObject bo)
Returns the type, name and revision of this object.
|
static java.lang.String[] |
getTNRI(matrix.db.BusinessObject bo)
Returns the type, name, revision and ID of this object.
|
static java.lang.String |
getVaultName(matrix.db.BusinessObject bo)
Returns the name of the vault where this object currently is located.
|
static boolean |
hasFile(java.lang.String objectId,
java.lang.String fileName) |
static boolean |
isCurrentUserOwner(java.lang.String objectId)
Returns true if the current user is the owner of the business object with
the given id.
|
static boolean |
isInFirstState(matrix.db.BusinessObject bo)
Returns whether or not the businessobject is in it's first state.
|
static boolean |
isInLastState(matrix.db.BusinessObject bo)
Returns whether or not the businessobject is on it's last state.
|
static boolean |
isLocked(java.lang.String objectId)
Returns the lock status of an object.
|
static boolean |
isReserved(java.lang.String objectId)
Returns the reserved status of an object.
|
static boolean |
isTrue(java.lang.String oid,
java.lang.String expression)
Evaluates whether the given expression is true.
|
static void |
lock(java.lang.String objectId)
Locks the specified object.
|
static void |
modify(matrix.db.BusinessObject bo,
java.lang.String expr,
java.lang.String newValue)
Modify a businessobject property specified by a select expression.
|
static void |
modify(java.lang.String objectId,
java.lang.String expr,
java.lang.String newValue)
Modify a businessobject property specified by a select expression.
|
static void |
moveFile(java.lang.String fromObjectId,
java.lang.String toObjectId,
java.lang.String format,
java.lang.String fileName)
Moves a file from a businessobject to another businessobject This method
will only work on Matrix 10.5 or later.
|
static matrix.db.BusinessObject |
newBusinessObject(java.lang.String objectId)
Creates a new instance of matrix.db.BusinessObject.
|
static matrix.db.BusinessObject |
newBusinessObject(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault)
Creates a new instance of matrix.db.BusinessObject.
|
static void |
promote(matrix.db.BusinessObject bo)
Promotes the businessobject to its next state.
|
static void |
promote(java.lang.String objectId)
Promote the business object with the specified ID.
|
static void |
renameFile(java.lang.String objectId,
java.lang.String format,
java.lang.String oldFile,
java.lang.String newFile)
Renames a file on a business object.
|
static void |
reserve(java.lang.String objectId)
Reserves an object without any comments
|
static void |
reserve(java.lang.String objectId,
java.lang.String comment)
Reserves an object
|
static matrix.db.BusinessObject |
revise(matrix.db.BusinessObject object)
Create a new revision of the businessobject.
|
static matrix.db.BusinessObject |
revise(matrix.db.BusinessObject object,
boolean inheritFiles)
Create a new revision of the businessobject.
|
static matrix.db.BusinessObject |
revise(matrix.db.BusinessObject object,
java.lang.String newRev)
Create a new revision of the businessobject.
|
static matrix.db.BusinessObject |
revise(matrix.db.BusinessObject object,
java.lang.String newRev,
java.lang.String newVault)
Create a new revision of the businessobject.
|
static matrix.db.BusinessObject |
revise(matrix.db.BusinessObject object,
java.lang.String newRev,
java.lang.String newVault,
boolean inheritFiles)
Create a new revision of the businessobject.
|
static java.lang.String |
revise(java.lang.String objectId,
java.lang.String newRev,
java.lang.String newVault)
Create a new revision of the businessobject.
|
static void |
schedule(matrix.db.BusinessObject bo,
java.lang.String stateName,
java.util.Date date)
Schedule the state with the specified name.
|
static java.lang.String |
select(matrix.db.BusinessObject bo,
java.lang.String statement)
Selects the specified statement from the specified businessobject.
|
static matrix.db.BusinessObjectWithSelect |
select(matrix.db.BusinessObject bo,
matrix.util.StringList selectStatements)
Selects the specified statements from the specified businessobject.
|
static java.lang.String[] |
select(java.lang.String[] oidList,
Statement statement)
Selects the statement on all businessobjects.
|
static matrix.db.BusinessObjectWithSelectList |
select(java.lang.String[] oidList,
Statement[] statements)
Select the specified statements from the businessobjects with the
specified IDs.
|
static java.lang.String[] |
select(java.lang.String[] oidList,
java.lang.String statement)
Selects the statement on all businessobjects.
|
static matrix.db.BusinessObjectWithSelectList |
select(java.lang.String[] oidList,
matrix.util.StringList statements)
Select the specified statements from the businessobjects with the
specified IDs.
|
static java.lang.String |
select(java.lang.String oid,
Statement statement)
Selects the statement from the businessobject.
|
static java.lang.String[] |
select(java.lang.String oid,
Statement[] statements)
Select the specified statements on a particular businessobject.
|
static java.lang.String |
select(java.lang.String oid,
java.lang.String statement)
Selects the statement from the businessobject.
|
static java.lang.String[] |
select(java.lang.String oid,
java.lang.String[] statements)
Select the specified statements on a particular businessobject.
|
static matrix.db.BusinessObjectWithSelect |
select(java.lang.String objectId,
matrix.util.StringList statements)
Select the specified statements from the businessobject with the
specified ID.
|
static java.lang.String |
select(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
Statement statement)
Selects the statement from the businessobject.
|
static java.lang.String |
select(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
java.lang.String statement)
Selects the statement from the businessobject.
|
static java.lang.String[] |
selectArray(matrix.db.BusinessObject bo,
java.lang.String statement)
Selects the specified statement from the specified businessobject.
|
static matrix.util.StringList[] |
selectList(matrix.db.BusinessObject bo,
Statement[] statements)
Select an array of statements on a particular business object.
|
static matrix.util.StringList |
selectList(matrix.db.BusinessObject bo,
java.lang.String statement)
Selects the specified statement from the specified businessobject.
|
static matrix.util.StringList[] |
selectList(java.lang.String[] oidList,
Statement statement)
Selects the statement on all businessobjects.
|
static matrix.util.StringList[] |
selectList(java.lang.String[] oidList,
java.lang.String statement)
Selects the statement on all businessobjects.
|
static matrix.util.StringList |
selectList(java.lang.String oid,
Statement statement)
Select a statement on a particular business object and return all values
returned from that statement.
|
static matrix.util.StringList[] |
selectList(java.lang.String oid,
Statement[] statements)
Select an array of statements on a particular business object.
|
static matrix.util.StringList |
selectList(java.lang.String oid,
java.lang.String statement)
Select a statement on a particular business object and return all values
returned from that statement.
|
static matrix.util.StringList[] |
selectList(java.lang.String oid,
java.lang.String[] statements)
Select an array of statements on a particular business object.
|
static void |
setAttribute(matrix.db.BusinessObject bo,
matrix.db.Attribute attribute)
Modify an attribute on the businessobject.
|
static void |
setAttribute(matrix.db.BusinessObject bo,
java.lang.String attribute,
java.lang.String value)
Modify an attribute on the businessobject.
|
static void |
setAttribute(java.lang.String objectId,
java.lang.String attribute,
java.lang.String... values)
Modify a multivalue attribute on the businessobject.
|
static void |
setAttribute(java.lang.String objectId,
java.lang.String attribute,
java.lang.String value)
Modify an attribute on the businessobject.
|
static void |
setAttributes(matrix.db.BusinessObject bo,
matrix.db.AttributeList attributes)
Modify the attributes on the businessobject.
|
static void |
setAttributes(java.lang.String objectId,
matrix.db.AttributeList attributes)
Modify the attributes on the businessobject.
|
static void |
setAttributes(java.lang.String objectId,
java.lang.String[] attributes,
java.lang.String[] values)
Sets the specified attributes on the businessobject.
|
static void |
setDescription(matrix.db.BusinessObject bo,
java.lang.String value)
Sets the description of the specified businessobject.
|
static void |
setDescription(java.lang.String objectId,
java.lang.String value)
Sets the description of the specified businessobject.
|
static void |
setModified(java.lang.String objectId,
java.util.Date date)
Sets the modified timestamp on a businessobject
|
static void |
setOriginated(java.lang.String objectId,
java.util.Date date)
Sets the originated timestamp on a businessobject
|
static int |
setState(matrix.db.BusinessObject bus,
java.lang.String state)
Promotes the businessobject to the specified state.
|
static int |
setState(java.lang.String objectId,
java.lang.String state)
Promotes the businessobject to the specified state.
|
static void |
unlock(java.lang.String objectId)
Unlocks the specified object.
|
static void |
unreserve(java.lang.String objectId) |
static void |
update(matrix.db.BusinessObject object,
matrix.db.AttributeList attributes,
java.lang.String description,
java.lang.String owner)
Multi-purpose update method for a business object.
|
static void |
update(java.lang.String objectId,
matrix.db.AttributeList attributes,
java.lang.String description,
java.lang.String owner)
Multi-purpose update method for a business object.
|
public static matrix.db.BusinessObject newBusinessObject(java.lang.String objectId)
throws TVCException
objectId - A businessobject ID.TVCException - If unable to create a matrix.db.BusinessObject
instance.public static matrix.db.BusinessObject newBusinessObject(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault)
throws TVCException
type - The type name.name - The name of the businessobject.revision - The revision.vault - The vault (optional).TVCException - If unable to create the matrix.db.BusinessObject
instance.public static matrix.db.BusinessObject clone(matrix.db.BusinessObject bo,
java.lang.String newName,
java.lang.String newRev,
java.lang.String newVault)
throws TVCException
bo - The businessobject to clone.newName - The new name.newRev - The new revision.newVault - The new vault.TVCException - If unable to clone the business object.public static matrix.db.BusinessObject clone(matrix.db.BusinessObject bo,
java.lang.String newName,
java.lang.String newRev,
java.lang.String newVault,
matrix.db.AttributeList attributes)
throws TVCException
bo - The businessobject to clone.newName - The new name.newRev - The new revision.newVault - The new vault.attributes - Attributes that should be updated on the clone.TVCException - If unable to clone the business object.public static matrix.db.Relationship connect(java.lang.String fromOID,
java.lang.String toOID,
java.lang.String relationshipName)
throws TVCException
fromOID - The businessobject on the from side.toOID - The businessobject on the to side.relationshipName - The name of the relationship.TVCException - If unable to connect.public static matrix.db.Relationship connect(java.lang.String fromOID,
java.lang.String toOID,
java.lang.String relationshipName,
matrix.db.AttributeList attributes)
throws TVCException
fromOID - The businessobject on the from side.toOID - The businessobject on the to side.relationshipName - The name of the relationship.attributes - Any attributes that should be updated on the
relationship.TVCException - If unable to connect.public static matrix.db.Relationship connect(matrix.db.BusinessObject from,
matrix.db.BusinessObject to,
java.lang.String relationshipName)
throws TVCException
from - The businessobject on the from side.to - The businessobject on the to side.relationshipName - The name of the relationship.TVCExceptionpublic static matrix.db.Relationship connect(matrix.db.BusinessObject from,
matrix.db.BusinessObject to,
java.lang.String relationshipName,
matrix.db.AttributeList attributes)
throws TVCException
from - The businessobject on the from side.to - The businessobject on the to side.relationshipName - The name of the relationship.attributes - Any attributes that should be updated on the
relationship.TVCException - If unable to connect.public static boolean exists(matrix.db.BusinessObject bo)
throws TVCException
bo - The business object to testTVCExceptionpublic static boolean exists(java.lang.String type,
java.lang.String name,
java.lang.String revision)
throws TVCException
type - The type of the object.name - The name of the object.revision - The revision of the object.TVCException - If unable to check if the object exists.public static boolean exists(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault)
throws TVCException
type - The type of the object.name - The name of the object.revision - The revision of the object.TVCException - If unable to check if the object exists.public static boolean exists(java.lang.String objectId)
throws TVCException
Note: In Matrix, you can not simply check if an object exists or not, if you only have the ID of the business object.
This method will use savepoints to accomplish this, hence the overhead of
this method is probably a bit higher than it is if you would use the
exists(BusinessObject) or
exists(String, String, String).
Basically, this method will do:
TxSavepoint sp = TxManager.getLocalTxContext().savepoint();
try {
return StringUtils.isTrue(MQLUtils.mql("pri bus " + objectId + " select exists dump"));
} catch (TVCException t) {
sp.abort();
return false;
}
objectId - The object idTVCExceptionpublic static void lock(java.lang.String objectId)
throws TVCException
objectId - The objectId of the object to be lockedTVCException - if unable to lock the objectpublic static void unlock(java.lang.String objectId)
throws TVCException
objectId - The objectId of the object to be unlockedTVCException - if unable to lock the objectpublic static boolean isLocked(java.lang.String objectId)
throws TVCException
objectId - The objectId of the object to be checkedTVCException - if unable to get datapublic static boolean isReserved(java.lang.String objectId)
throws TVCException
objectId - The objectId of the object to be checkedTVCException - if unable to get datapublic static java.lang.String[] getTNR(matrix.db.BusinessObject bo)
throws TVCException
bo - A business object.TVCException - If unable to get the type, name and revision of the
businessobject.public static java.lang.String[] getTNRI(matrix.db.BusinessObject bo)
throws TVCException
bo - A business object.TVCException - If unable to get the type, name, revision and ID of
the businessobject.public static matrix.db.BusinessObject create(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
java.lang.String policy,
java.lang.String owner,
matrix.db.AttributeList al)
throws TVCException
type - The type of the businessobject.name - The name of the businessobject.revision - The revision of the businessobject (optional). If not
specified the first revision as defined in the revision sequence
on the policy will be used instead.vault - The vault in which the businessobject will be created.policy - The policy if the businessobject.owner - The businessobject's owner (optional).al - Attributes that should be updated on the businessobject
(optional).TVCException - If unable to create the businessobject.public static matrix.db.BusinessObject create(matrix.db.BusinessObject bo,
java.lang.String policy,
java.lang.String owner,
matrix.db.AttributeList al)
throws TVCException
bo - The business objectpolicy - The policy to useowner - The owner to setal - The attributes for the business objectTVCException - If unable to create the businessobject.public static java.lang.String create(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
java.lang.String policy,
java.lang.String description,
java.lang.String owner,
java.lang.String organizationOwnership,
java.lang.String projectOwnership,
java.util.Map<java.lang.String,java.lang.String> attributes)
throws TVCException
type - name - revision - vault - policy - description - owner - organizationOwnership - projectOwnership - attributes - TVCExceptionpublic static void delete(matrix.db.BusinessObject object)
throws TVCException
object - The object to delete from the database.TVCException - If unable to delete the object.public static void delete(java.lang.String objectId)
throws TVCException
objectId - The ID of the businessobject to delete from the database.TVCException - If unable to delete the object.public static void demote(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to demote.public static void demote(java.lang.String objectId)
throws TVCException
objectId - A business object ID.TVCException - If unable to demote.public static void promote(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to promote.public static void promote(java.lang.String objectId)
throws TVCException
objectId - A business object ID.TVCException - If unable to promote.public static matrix.db.BusinessObjectList getAllRevisions(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the revisions.public static java.lang.String getLatestRevisionInState(java.lang.String objectId,
java.lang.String stateName)
throws TVCException
objectId - The OID of a business object.stateName - The name of the accepted state.TVCException - If unable to get the latest revision.public static java.lang.String getLatestRevisionInState(java.lang.String objectId,
java.lang.String[] stateNames)
throws TVCException
objectId - The OID of a business object.stateNames - The name of accepted states.TVCException - If unable to get the latest revision.public static matrix.db.State getState(matrix.db.BusinessObject bo,
java.lang.String stateName)
throws TVCException
bo - A businessobject.stateName - The name of a state.TVCException - If unable to get the state.public static matrix.db.StateList getStates(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the states.public static matrix.db.State getCurrentState(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the current state.public static matrix.db.BusinessObject getFirstRevision(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the first revision.public static matrix.db.BusinessObject getLastRevision(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the last revision.public static java.lang.String getPolicyName(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the name of the policy.public static matrix.db.Policy getPolicy(matrix.db.BusinessObject bo)
throws TVCException
TVCExceptionpublic static java.lang.String getVaultName(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the name of the vault.public static matrix.util.StringList getHistory(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the history.public static java.lang.String getOwner(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the owner.public static java.lang.String getOwner(java.lang.String objectId)
throws TVCException
objectId - The object idTVCException - If unable to get the ownerpublic static boolean isCurrentUserOwner(java.lang.String objectId)
throws TVCException
This method does:
return TxManager.getCurrentUser().equals(getOwner(objectId));
objectId - The object idTVCException - If unable to get the owner.public static void reserve(java.lang.String objectId)
throws TVCException
objectId - The object idTVCExceptionpublic static void reserve(java.lang.String objectId,
java.lang.String comment)
throws TVCException
objectId - comment - TVCExceptionpublic static void unreserve(java.lang.String objectId)
throws TVCException
TVCExceptionpublic static matrix.db.BusinessObject revise(matrix.db.BusinessObject object)
throws TVCException
object - A businessobject.TVCException - If unable to revise the businessobject.public static matrix.db.BusinessObject revise(matrix.db.BusinessObject object,
java.lang.String newRev)
throws TVCException
object - A businessobject.newRev - The new revision token.TVCException - If unable to revise the businessobject.public static matrix.db.BusinessObject revise(matrix.db.BusinessObject object,
java.lang.String newRev,
java.lang.String newVault)
throws TVCException
object - A businessobject.newRev - The new revision token.newVault - The name of the vault in which the new revision will be
created.TVCException - If unable to revise the businessobject.public static matrix.db.BusinessObject revise(matrix.db.BusinessObject object,
boolean inheritFiles)
throws TVCException
object - A businessobject.inheritFiles - If to inherit files from the previous revisionTVCException - If unable to revise the businessobject.public static matrix.db.BusinessObject revise(matrix.db.BusinessObject object,
java.lang.String newRev,
java.lang.String newVault,
boolean inheritFiles)
throws TVCException
object - A businessobject.newRev - The new revision token.newVault - The name of the vault in which the new revision will be
created.inheritFiles - If to inherit files from the previous revisionTVCException - If unable to revise the businessobject.public static java.lang.String revise(java.lang.String objectId,
java.lang.String newRev,
java.lang.String newVault)
throws TVCException
objectId - A businessobject.newRev - The new revision token.newVault - The name of the vault in which the new revision will be
created.TVCException - If unable to revise the businessobject.public static java.lang.String getAttributeValue(matrix.db.BusinessObject bo,
java.lang.String attributeName)
throws TVCException
bo - A businessobject.attributeName - The name of an attribute.TVCException - If unable to get the attribute value.public static java.lang.String getAttributeValue(java.lang.String objectId,
java.lang.String attributeName)
throws TVCException
objectId - A businessobject ID.attributeName - The name of an attribute.TVCException - If unable to get the attribute value.public static java.lang.String select(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
Statement statement)
throws TVCException
type - The type of the business object.name - The name of the business object.revision - The revision of the business object.vault - The vault of the business object (optional).statement - A select statement.TVCException - If unable to select.public static java.lang.String select(java.lang.String type,
java.lang.String name,
java.lang.String revision,
java.lang.String vault,
java.lang.String statement)
throws TVCException
type - The type of the business object.name - The name of the business object.revision - The revision of the business object.vault - The vault of the business object (optional).statement - A select statement.TVCException - If unable to select.public static java.lang.String select(java.lang.String oid,
java.lang.String statement)
throws TVCException
oid - A businessobject ID.statement - A select statement.TVCException - If unable to select.public static java.lang.String select(java.lang.String oid,
Statement statement)
throws TVCException
oid - A businessobject ID.statement - A select statement.TVCException - If unable to select.public static java.lang.String[] select(java.lang.String oid,
java.lang.String[] statements)
throws TVCException
oid - The ID of the business object.statements - The select statements.TVCException - If an error occurs when selecting data.public static java.lang.String[] select(java.lang.String oid,
Statement[] statements)
throws TVCException
oid - The ID of the business object.statements - The select statements.TVCException - If an error occurs when selecting data.public static java.lang.String[] select(java.lang.String[] oidList,
java.lang.String statement)
throws TVCException
oidList - An array of businessobject IDs.statement - A select statement.TVCException - If unable to select.public static java.lang.String[] select(java.lang.String[] oidList,
Statement statement)
throws TVCException
oidList - An array of businessobject IDs.statement - A select statement.TVCException - If unable to select.public static matrix.util.StringList[] selectList(java.lang.String[] oidList,
java.lang.String statement)
throws TVCException
oidList - An array of businessobject IDs.statement - A select statement.TVCException - If unable to select.public static matrix.util.StringList[] selectList(java.lang.String[] oidList,
Statement statement)
throws TVCException
oidList - An array of businessobject IDs.statement - A select statement.TVCException - If unable to select.public static matrix.util.StringList[] selectList(java.lang.String oid,
java.lang.String[] statements)
throws TVCException
oid - The ID of the business object.statements - An array of select statements.TVCException - If unable to select data from the database.public static matrix.util.StringList[] selectList(java.lang.String oid,
Statement[] statements)
throws TVCException
oid - The ID of the business object.statements - An array of select statements.TVCException - If unable to select data from the database.public static matrix.util.StringList[] selectList(matrix.db.BusinessObject bo,
Statement[] statements)
throws TVCException
bo - the business object.statements - An array of select statements.TVCException - If unable to select data from the database.public static matrix.util.StringList selectList(java.lang.String oid,
java.lang.String statement)
throws TVCException
oid - The ID of the business object.statement - The select statement.TVCException - If unable to select data from the database.public static matrix.util.StringList selectList(java.lang.String oid,
Statement statement)
throws TVCException
oid - The ID of the business object.statement - The select statement.TVCException - If unable to select data from the database.public static matrix.db.BusinessObjectWithSelect select(java.lang.String objectId,
matrix.util.StringList statements)
throws TVCException
objectId - An object ID.statements - Select statements.TVCException - If unable to select.public static matrix.db.BusinessObjectWithSelectList select(java.lang.String[] oidList,
Statement[] statements)
throws TVCException
oidList - An array containing businessobject IDs.statements - The select statements.TVCException - If unable to select.public static matrix.db.BusinessObjectWithSelectList select(java.lang.String[] oidList,
matrix.util.StringList statements)
throws TVCException
oidList - An array containing businessobject IDs.statements - The select statements.TVCException - If unable to select.public static java.lang.String select(matrix.db.BusinessObject bo,
java.lang.String statement)
throws TVCException
bo - A businessobject.statement - A select statement.TVCException - If unable to select.public static matrix.util.StringList selectList(matrix.db.BusinessObject bo,
java.lang.String statement)
throws TVCException
bo - A businessobject.statement - A select statement.TVCException - If unable to select.public static java.lang.String[] selectArray(matrix.db.BusinessObject bo,
java.lang.String statement)
throws TVCException
bo - A businessobject.statement - A select statement.TVCException - If unable to select.public static matrix.db.BusinessObjectWithSelect select(matrix.db.BusinessObject bo,
matrix.util.StringList selectStatements)
throws TVCException
bo - A businessobject.selectStatements - The select statements.TVCException - If unable to select.public static matrix.db.BusinessObjectBasics getBasics(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the basics.public static matrix.db.BusinessInterfaceList getBusinessInterfaces(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to load the interfaces.public static matrix.db.BusinessInterfaceList getBusinessInterfaces(java.lang.String objectId)
throws TVCException
objectId - The id of a businessobject.TVCException - If unable to load the interfaces.public static matrix.db.AttributeList getAttributes(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get the attributes.public static void modify(java.lang.String objectId,
java.lang.String expr,
java.lang.String newValue)
throws TVCException
objectId - The if of the businessobject.expr - Select expression for the value to modify. The follwing
select expressions are supported:
newValue - New value.TVCException - If unable to modify.public static void modify(matrix.db.BusinessObject bo,
java.lang.String expr,
java.lang.String newValue)
throws TVCException
bo - A businessobject.expr - Select expression for the value to modify. The follwing
select expressions are supported:
newValue - New value.TVCException - If unable to modify.public static void setAttribute(java.lang.String objectId,
java.lang.String attribute,
java.lang.String value)
throws TVCException
objectId - A businessobject ID.attribute - The name of an attribute.value - The new value.TVCException - If unable to modify the attribute.public static void setAttribute(java.lang.String objectId,
java.lang.String attribute,
java.lang.String... values)
throws TVCException
objectId - A businessobject ID.attribute - The name of an attribute.value - The new values to set.TVCException - If unable to modify the attribute.public static void setAttributes(java.lang.String objectId,
java.lang.String[] attributes,
java.lang.String[] values)
throws TVCException
objectId - The object ID.attributes - The names of the attributes.values - The values of the attributes.TVCException - If unable to set the attributes.public static void setAttribute(matrix.db.BusinessObject bo,
java.lang.String attribute,
java.lang.String value)
throws TVCException
bo - A businessobject.attribute - The name of an attribute.value - The new value.TVCException - If unable to modify the attribute.public static void setAttribute(matrix.db.BusinessObject bo,
matrix.db.Attribute attribute)
throws TVCException
bo - A businessobject.attribute - The attribute (name and value).TVCException - If unable to modify the attribute.public static void setAttributes(matrix.db.BusinessObject bo,
matrix.db.AttributeList attributes)
throws TVCException
bo - A businessobject.attributes - List of attributes (name and value) to modify.TVCException - If unable to modify.public static void setAttributes(java.lang.String objectId,
matrix.db.AttributeList attributes)
throws TVCException
objectId - A businessobject ID.attributes - List of attributes (name and value) to modify.TVCException - If unable to modify.public static matrix.db.BusinessObject changeName(matrix.db.BusinessObject bo,
java.lang.String newName)
throws TVCException
bo - A businessobject.newName - The new name.TVCException - If unable to change the name.public static matrix.db.BusinessObject changeType(matrix.db.BusinessObject bo,
java.lang.String newType)
throws TVCException
bo - A businessobject.newType - The new type.TVCException - If unable to change the type.public static void changeType(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
objectId - The if for the object to changenewValue - The new valeTVCException - If unable to perform the operationpublic static void changeName(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
objectId - The id for the object to changenewValue - The new valueTVCException - If unable to perform the operationpublic static void changeRevision(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
Since changing the revision cannot be done without renaming the object, we also do that, but we will afterwards re-name the object back to its original name.
The problem is that this might not always work, so this method might throw an exception in some cases due to this. That will in turn result in that the transaction is rolled back, so the name should still be the same as before invoking this method (hopefully ;)
objectId - The id for the object to changenewValue - The new valueTVCException - If unable to perform the operationpublic static void changeOwner(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
objectId - The if for the object to changenewValue - The new valueTVCException - If unable to perform the operationpublic static void changeAltOwner1(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
objectId - The if for the object to changenewValue - The new valueTVCException - If unable to perform the operationpublic static void changeAltOwner2(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
objectId - The if for the object to changenewValue - The new valueTVCException - If unable to perform the operationpublic static void changeVault(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
objectId - The if for the object to changenewValue - The new valueTVCException - If unable to perform the operationpublic static void changePolicy(java.lang.String objectId,
java.lang.String newValue)
throws TVCException
objectId - The if for the object to changenewValue - The new valueTVCException - If unable to perform the operationpublic static void changeOwner(matrix.db.BusinessObject bo,
java.lang.String owner)
throws TVCException
bo - A businessobject.owner - The new owner.TVCException - If unable to change owner.public static void setDescription(matrix.db.BusinessObject bo,
java.lang.String value)
throws TVCException
bo - A businessobject.value - The new description.TVCException - If unable to modify the description.public static void setDescription(java.lang.String objectId,
java.lang.String value)
throws TVCException
objectId - A businessobject ID.value - The new description.TVCException - If unable to modify the description.java.lang.NullPointerException - If the objectId argument is nullpublic static void setModified(java.lang.String objectId,
java.util.Date date)
throws TVCException
objectId - A businessobject ID.date - The new modified time-stamp (null forces current time)TVCException - If unable to modify the modified-timstampjava.lang.NullPointerException - If the objectId argument is nullpublic static void setOriginated(java.lang.String objectId,
java.util.Date date)
throws TVCException
objectId - A businessobject ID.date - The new originated time-stamp (null forces current time)TVCException - If unable to modify the originated-timstampjava.lang.NullPointerException - If the objectId argument is nullpublic static void update(java.lang.String objectId,
matrix.db.AttributeList attributes,
java.lang.String description,
java.lang.String owner)
throws TVCException
objectId - A business object ID.attributes - A list of new attribute values (optional).description - The new description (optional).owner - The new owner (optional).TVCException - If unable to update the business object.public static void update(matrix.db.BusinessObject object,
matrix.db.AttributeList attributes,
java.lang.String description,
java.lang.String owner)
throws TVCException
object - A business object.attributes - A list of new attribute values (optional).description - The new description (optional).owner - The new owner (optional).TVCException - If unable to update the business object.public static java.lang.String getNextSequence(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get next sequence.public static boolean isInFirstState(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to check state.public static boolean isInLastState(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to check state.public static matrix.db.Expansion expand(matrix.db.BusinessObject bo,
short level,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
matrix.db.Visuals visuals)
throws TVCException
bo - A businessobject.level - The number of levels to expand (0 for all levels).objectWhereClause - The where clause that should be evaluated on the
businessobjects.relationshipWhereClause - The where clause that should be evaluated
on the relationships.visuals - Visuals containing active filters.TVCException - If unable to expand.public static matrix.db.ExpansionWithSelect expandSelect(java.lang.String objectId,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
int recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
throws TVCException
objectId - The ID of a businessobject.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether to for the selection results to StringList instances
(kind of pointless parameter).TVCException - If unable to expand.public static matrix.db.ExpansionWithSelect expandSelect(java.lang.String objectId,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
throws TVCException
objectId - The ID of a businessobject.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether to for the selection results to StringList instances
(kind of pointless parameter).TVCException - If unable to expand.public static matrix.db.ExpansionWithSelect expandSelect(matrix.db.BusinessObject bo,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
int recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
throws TVCException
bo - A businessobject.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether to for the selection results to StringList instances
(kind of pointless parameter).TVCException - If unable to expand.public static matrix.db.ExpansionWithSelect expandSelect(matrix.db.BusinessObject bo,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list)
throws TVCException
bo - A businessobject.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether to for the selection results to StringList instances
(kind of pointless parameter).TVCException - If unable to expand.public static matrix.db.ExpansionWithSelect expandSelect(matrix.db.BusinessObject bo,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden)
throws TVCException
bo - A businessobject.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether to for the selection results to StringList instances
(kind of pointless parameter).limit - The maximum number of objects to returncheckHidden - True to check for hidden types per
MX_SHOW_HIDDEN_TYPE_OBJECTS setting; false to return all objects,
even if hiddenTVCException - If unable to expand.public static java.util.Iterator<java.lang.String[]> expandToEnd(java.lang.String objectId,
java.lang.String relationshipPattern,
java.lang.String typePattern,
boolean getTo,
boolean getFrom,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause)
throws TVCException
Note: This method uses the "recurse to end" clause when expanding; and this feature is not available in Matrix prior to version 10.6.3. Using this method for a pre 10.6.3 version will result in an error to be thrown.
objectId - The id of a businessobject.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.TVCException - If unable to expand.public static matrix.db.ExpansionIterator getExpansionIterator(java.lang.String objectId,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden,
boolean preventDuplicates)
throws TVCException
objectId - The business object idpageSize - The expansion iterator page size.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether to for the selection results to StringList instances
(kind of pointless parameter).limit - The maximum number of objects to returncheckHidden - True to check for hidden types per
MX_SHOW_HIDDEN_TYPE_OBJECTS setting; false to return all objects,
even if hiddenpreventDuplicates - Whether expanded result should not contain any
duplicate objects.TVCException - If unable to expand.public static matrix.db.ExpansionIterator getExpansionIterator(java.lang.String objectId,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden)
throws TVCException
objectId - The business object idpageSize - The expansion iterator page size.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether or not selection results be returned as StringList
instances.limit - The maximum number of objects to returncheckHidden - True to check for hidden types per
MX_SHOW_HIDDEN_TYPE_OBJECTS setting; false to return all objects,
even if hiddenTVCException - If unable to expand.public static matrix.db.ExpansionIterator getExpansionIterator(matrix.db.BusinessObject bo,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden)
throws TVCException
bo - The business object to expand.pageSize - The expansion iterator page size.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether or not selection results be returned as StringList
instances.limit - The maximum number of objects to returncheckHidden - True to check for hidden types per
MX_SHOW_HIDDEN_TYPE_OBJECTS setting; false to return all objects,
even if hiddenTVCException - If unable to expand.public static matrix.db.ExpansionIterator getExpansionIterator(matrix.db.BusinessObject bo,
short pageSize,
java.lang.String relationshipPattern,
java.lang.String typePattern,
matrix.util.StringList selectBusStatements,
matrix.util.StringList selectRelStatements,
boolean getTo,
boolean getFrom,
short recurseToLevel,
java.lang.String objectWhereClause,
java.lang.String relationshipWhereClause,
boolean list,
short limit,
boolean checkHidden,
boolean preventDuplicates)
throws TVCException
bo - The business object to expand.pageSize - The expansion iterator page size.relationshipPattern - A relationship pattern (null will be treated
as *).typePattern - A type pattern (null will be treated as *).selectBusStatements - Select statements on the businessobjects
(Optional).selectRelStatements - Select statements on the relationships
(Optional).getTo - Whether or not to get to-side relationships.getFrom - Whether or not to get from-side relationships.recurseToLevel - Level of recursion (0 is all).objectWhereClause - Where clause that will be evaluated on
businessobjects.relationshipWhereClause - Where clause that will be evaluated on
relationships.list - Whether to for the selection results to StringList instances
(kind of pointless parameter).limit - The maximum number of objects to returncheckHidden - True to check for hidden types per
MX_SHOW_HIDDEN_TYPE_OBJECTS setting; false to return all objects,
even if hiddenpreventDuplicates - Whether expanded result should not contain any
duplicate objects.TVCException - If unable to expand.public static void schedule(matrix.db.BusinessObject bo,
java.lang.String stateName,
java.util.Date date)
throws TVCException
bo - A businessobject.stateName - The name of the state.date - The scheduled date.TVCException - If unable to schedule.public static int copyFiles(java.lang.String srcObjectId,
java.lang.String targetObjectId)
throws TVCException
srcObjectId - The source object that contains the files to copy.targetObjectId - The target object where the files will be added.TVCException - If unable to copy files from one object to another
for whatever reason.public static int copyFiles(java.lang.String srcObjectId,
java.lang.String targetObjectId,
boolean append)
throws TVCException
srcObjectId - The source object that contains the files to copy.targetObjectId - The target object where the files will be added.append - Whether to append the files from the source object to the
target object's existing files. If false any existing files on the
target object will be removed.TVCException - If unable to copy files from one object to another
for whatever reason.public static java.io.OutputStream checkinOutputStream(java.lang.String objectId,
java.lang.String fileName,
java.lang.String format,
java.lang.String store,
boolean unlock,
boolean append)
throws TVCException
objectId - The ID of the object to which the file should be checked
in.fileName - The name of the file.format - The format of the file.store - The store, i.e., where to put the file.unlock - Whether to unlock the file.append - Whether to append to the files that might already exist on
the business object.TVCException - If unable to create the OutputStream.public static java.io.InputStream checkoutInputStream(java.lang.String objectId,
java.lang.String format,
java.lang.String fileName,
boolean lock)
throws TVCException
objectId - The object id of the business objectformat - The formatfileName - The file namelock - If to lock the business object when checking out the file.TVCException - Upon any kind of problems that can occur.public static void checkoutMultipleFiles(java.lang.String objectId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> formatFiles,
java.io.OutputStream os,
boolean lock)
throws TVCException,
java.io.IOException
objectId - The object id of the business objectformatFile - Map of format and corresponding files for checkoutOutputStream - output streamlock - If to lock the business object when checking out the file.TVCException - Upon any kind of problems that can occur.java.io.IOException - Upon any kind of file io problem.public static void checkinFile(java.lang.String objectId,
java.io.InputStream in,
java.lang.String fileName,
java.lang.String format,
java.lang.String store,
boolean unlock,
boolean append)
throws TVCException
objectId - The object id of the businessobjectin - The inputstream, containing the datafileName - The name of the fileformat - The formatstore - The store, or empty, if to use the default store as
specified on the policy.unlock - True to unlock after checkin.append - True to append.TVCException - If unable to check in the data.public static void checkinFile(matrix.db.BusinessObject bo,
java.io.File file)
throws TVCException
bo - A businessobject.file - A file on the disk that should be checked into the
businessobject.TVCException - If unable to check in.public static void checkinFile(matrix.db.BusinessObject bo,
java.io.File file,
java.lang.String format)
throws TVCException
bo - A businessobject.file - A file on the disk that should be checked into the
businessobject.format - The name of a format that the file will be check into.TVCException - If unable to check in.public static void checkinFileFromServer(java.lang.String objectId,
java.io.File file,
java.lang.String format,
java.lang.String store,
boolean unlock,
boolean append)
throws TVCException
objectId - The ID of the object to which the file should be checked
in to.file - The file to be checked in.format - The format of the file.store - The store, i.e., where to put the file. If null is provided,
the store will be determined based upon the policy used for the
object.unlock - Whether to unlock the file.append - Whether to append to the files that might already exist on
the business object.TVCException - Upon problems with the checkin operation.public static void checkinFile(matrix.db.BusinessObject bo,
java.io.File file,
java.lang.String format,
java.lang.String store,
java.lang.String host,
boolean unlock,
boolean append)
throws TVCException
TVCSystem.getHost()bo - A businessobject.file - A file on the disk.format - The name of the format.store - The name of the store.host - The name of the host.unlock - Whether to unlock.append - Whether to append.TVCException - If unable to check in.public static matrix.db.File[] getFiles(java.lang.String objectId)
throws TVCException
objectId - The id of a business objectTVCException - If unable to get files.public static matrix.db.File[] getFiles(matrix.db.BusinessObject bo)
throws TVCException
bo - A businessobject.TVCException - If unable to get files.public static void checkoutFile(java.lang.String objectId,
java.lang.String format,
java.lang.String file,
boolean lock,
java.io.OutputStream out)
throws TVCException
objectId - The id of a businessobjectformat - The name of the format.file - The name of the file.lock - Whether to lock.out - The output stream to which the file will be written.TVCException - If unable to check out.public static void checkoutFile(matrix.db.BusinessObject bo,
java.lang.String format,
java.lang.String file,
boolean lock,
java.io.OutputStream out)
throws TVCException
bo - A businessobject.format - The name of the format.file - The name of the file.lock - Whether to lock.out - The output stream to which the file will be written.TVCException - If unable to check out.public static void checkoutFile(matrix.db.BusinessObject bo,
java.lang.String format,
java.lang.String file,
boolean lock,
java.io.OutputStream out,
boolean closeStream)
throws TVCException
bo - A businessobject.format - The name of the format.file - The name of the file.lock - Whether to lock.closeStream - False if the output stream shouldn't be closed after
checkout.out - The output stream to which the file will be written.TVCException - If unable to check out.public static void moveFile(java.lang.String fromObjectId,
java.lang.String toObjectId,
java.lang.String format,
java.lang.String fileName)
throws TVCException
fromObjectId - toObjectId - format - fileName - TVCExceptionpublic static void renameFile(java.lang.String objectId,
java.lang.String format,
java.lang.String oldFile,
java.lang.String newFile)
throws TVCException
NOTE: This method uses the MQL command mod bus ID rename ... so this method might not work in older versions of ENOVIA.
objectId - format - oldFile - newFile - TVCExceptionpublic static java.lang.String getFileFormat(java.lang.String objectId,
java.lang.String fileName)
throws TVCException
objectId - The object id of the businessobject to checkfileName - The name of the fileTVCExceptionpublic static matrix.db.BusinessObjectList convertOidList(java.lang.String[] oid)
oid - An array of businessobject IDs.public static java.lang.String[] convertBusList(matrix.db.BusinessObjectList bol)
bol - A list of matrix.db.BusinessObject instances.public static java.lang.String[] convertBusList(matrix.db.BusinessObjectWithSelectList bowsl)
public static java.lang.String getObjectId(java.lang.String type,
java.lang.String name,
java.lang.String rev,
java.lang.String vault)
throws TVCException
type - The type namename - The namerev - The revisionvault - The vault (or null, if unknown).TVCException - If unable to get the ID.java.lang.NullPointerException - If type, name or rev is null.public static java.lang.String getObjectId(matrix.db.BusinessObject object)
throws TVCException
object - A business object.TVCException - If an error occurs.public static boolean hasFile(java.lang.String objectId,
java.lang.String fileName)
throws TVCException
objectId - The objectidfileName - The filenameTVCExceptionpublic static void deleteFile(java.lang.String objectId,
java.lang.String fileName)
throws TVCException
objectId - fileName - TVCExceptionpublic static void deleteFile(java.lang.String objectId,
java.lang.String format,
java.lang.String fileName)
throws TVCException
objectId - fileName - TVCExceptionpublic static java.lang.StringBuffer debug(matrix.db.BusinessObjectWithSelect data)
data - public static boolean isTrue(java.lang.String oid,
java.lang.String expression)
throws TVCException
oid - The id of the business object.expression - An expression.TVCExceptionpublic static int setState(java.lang.String objectId,
java.lang.String state)
throws TVCException
objectId - businessobject id.state - expected state.TVCException - If unable to promote.public static int setState(matrix.db.BusinessObject bus,
java.lang.String state)
throws TVCException
bus - A businessobject.state - expected state.TVCException - If unable to promote.Copyright ? Technia AB. All Rights Reserved.