public final class SetUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
changeName(java.lang.String setName,
java.lang.String newSetName)
Changes the name of a set.
|
static boolean |
createSet(java.lang.String setName,
java.lang.String description)
Creates a new set, and sets the description of the set.
|
static boolean |
createSet(java.lang.String user,
java.lang.String setName,
java.lang.String description) |
static boolean |
deleteSet(java.lang.String setName)
Returns true, if the named collection was deleted.
|
static boolean |
deleteSet(java.lang.String user,
java.lang.String setName) |
static boolean |
deleteSets(java.lang.String[] setNames)
Deletes the specified sets.
|
static void |
distribute(java.lang.String setName,
java.lang.String newName,
java.lang.String toUser,
boolean overwrite)
Distributes a set to another user.
|
static boolean |
exists(java.lang.String setName)
Returns true, if the named collection exists.
|
static boolean |
exists(java.lang.String user,
java.lang.String setName)
Returns true, if the named collection exists.
|
static java.lang.String |
getDescription(java.lang.String setName)
Returns the description for a set.
|
static java.lang.String[] |
getObjectIdsFromSet(java.lang.String setName)
Returns the ids of the businessobjects in the specified set.
|
static java.lang.String[] |
getObjectIdsFromSet(java.lang.String user,
java.lang.String setName)
Returns the ids of the businessobjects in the specified set.
|
static java.lang.String |
getProperty(java.lang.String setName,
java.lang.String propertyName)
Returns the value of a property.
|
static java.lang.String[] |
listSets()
Returns the names of the different sets the current user has.
|
static java.lang.String[] |
listSets(boolean hidden) |
static java.lang.String[] |
listSets(java.lang.String user)
Returns the names of the different sets a specific user has.
|
static java.lang.String[] |
listStructures(boolean hidden)
Returns the names of the different structures a user has.
|
static void |
mergeSets(java.lang.String[] setNames,
java.lang.String targetSetName,
boolean append)
Merges a couple of sets together.
|
static void |
mergeSets(java.lang.String[] setNames,
java.lang.String targetSetName,
boolean append,
boolean keepOld)
Merges a couple of sets together.
|
static void |
purgeSet(java.lang.String setName)
Removes the items in a set
|
static void |
purgeSet(java.lang.String user,
java.lang.String name)
Removes the items in a set
|
static boolean |
removeFromSet(java.lang.String setName,
java.lang.String[] objectIds)
Removes items from a set.
|
static boolean |
removeFromSet(java.lang.String user,
java.lang.String setName,
java.lang.String[] objectIds) |
static void |
saveObjectIntoSet(java.lang.String setName,
java.lang.String objectId,
boolean append) |
static void |
saveObjectIntoSet(java.lang.String user,
java.lang.String setName,
java.lang.String objectId,
boolean append) |
static void |
saveObjectsIntoSet(java.lang.String setName,
java.util.Collection<java.lang.String> objectIds,
boolean append) |
static void |
saveObjectsIntoSet(java.lang.String setName,
java.lang.String[] objectIds,
boolean append)
Saves the specified objects into a named set.
|
static void |
saveObjectsIntoSet(java.lang.String user,
java.lang.String setName,
java.util.Collection<java.lang.String> objectIds,
boolean append) |
static void |
saveObjectsIntoSet(java.lang.String user,
java.lang.String setName,
java.lang.String[] objectIds,
boolean append) |
static void |
setDescription(java.lang.String setName,
java.lang.String description)
Sets the description for a set.
|
static void |
setDescription(java.lang.String user,
java.lang.String setName,
java.lang.String description) |
static void |
setProperty(java.lang.String setName,
java.lang.String propertyName,
java.lang.String propertyValue)
Sets the value of a property.
|
static void |
setProperty(java.lang.String user,
java.lang.String setName,
java.lang.String propertyName,
java.lang.String propertyValue)
Sets the value of a property.
|
static void |
validateName(java.lang.String name) |
public static java.lang.String[] getObjectIdsFromSet(java.lang.String setName)
throws TVCException
TVCExceptionpublic static java.lang.String[] getObjectIdsFromSet(java.lang.String user,
java.lang.String setName)
throws TVCException
user - The user owning the setsetName - The name of the setTVCExceptionpublic static java.lang.String[] listStructures(boolean hidden)
throws TVCException
TVCExceptionpublic static java.lang.String[] listSets(boolean hidden)
throws TVCException
TVCExceptionpublic static java.lang.String[] listSets()
throws TVCException
TVCExceptionpublic static java.lang.String[] listSets(java.lang.String user)
throws TVCException
user - The name of the user owning the listed sets.TVCExceptionpublic static boolean exists(java.lang.String setName)
throws TVCException
setName - The name of the collectionTVCException - Upon datbase problempublic static boolean exists(java.lang.String user,
java.lang.String setName)
throws TVCException
user - The usersetName - The name of the collectionTVCException - Upon datbase problempublic static void purgeSet(java.lang.String user,
java.lang.String name)
throws TVCException
user - The user owning the setname - The name of the set.TVCExceptionpublic static void purgeSet(java.lang.String setName)
throws TVCException
setName - The name of the set.TVCExceptionpublic static void saveObjectsIntoSet(java.lang.String setName,
java.lang.String[] objectIds,
boolean append)
throws TVCException
setName - objectIds - append - TVCExceptionpublic static void saveObjectIntoSet(java.lang.String setName,
java.lang.String objectId,
boolean append)
throws TVCException
setName - the name of the setobjectId - the objectIdappend - true to append otherwise purge the set firstTVCException - if an exception occurs during the save operationpublic static void saveObjectsIntoSet(java.lang.String setName,
java.util.Collection<java.lang.String> objectIds,
boolean append)
throws TVCException
TVCExceptionpublic static void saveObjectsIntoSet(java.lang.String user,
java.lang.String setName,
java.lang.String[] objectIds,
boolean append)
throws TVCException
TVCExceptionpublic static void saveObjectIntoSet(java.lang.String user,
java.lang.String setName,
java.lang.String objectId,
boolean append)
throws TVCException
user - the name of the usersetName - the name of the setobjectId - the objectIdappend - true to append otherwise purge the set firstTVCException - if an exception occurs during the save operationpublic static void saveObjectsIntoSet(java.lang.String user,
java.lang.String setName,
java.util.Collection<java.lang.String> objectIds,
boolean append)
throws TVCException
TVCExceptionpublic static boolean deleteSets(java.lang.String[] setNames)
throws TVCException
setNames - The names of the sets that should be deleted.TVCException - If an error occurs while deleting a set.public static boolean deleteSet(java.lang.String setName)
throws TVCException
setName - The name of the collectionTVCException - If unable to delete the set.public static boolean deleteSet(java.lang.String user,
java.lang.String setName)
throws TVCException
TVCExceptionpublic static void mergeSets(java.lang.String[] setNames,
java.lang.String targetSetName,
boolean append)
throws TVCException
setNames - The sets to be mergedtargetSetName - The name of the set, to which the objects will be
merged.append - If the target set exists, the append flag defines if the
objects should be appended to the set, or, replace the existing
objects within the set (if there were any).TVCExceptionTVCException - Upon datbase problempublic static void mergeSets(java.lang.String[] setNames,
java.lang.String targetSetName,
boolean append,
boolean keepOld)
throws TVCException
setNames - The sets to be mergedtargetSetName - The name of the set, to which the objects will be
merged.append - If the target set exists, the append flag defines if the
objects should be appended to the set, or, replace the existing
objects within the set (if there were any).keepOld - True if the sets should be kept as is.TVCExceptionTVCException - Upon datbase problempublic static boolean removeFromSet(java.lang.String setName,
java.lang.String[] objectIds)
throws TVCException
setName - objectIds - TVCExceptionpublic static boolean removeFromSet(java.lang.String user,
java.lang.String setName,
java.lang.String[] objectIds)
throws TVCException
TVCExceptionpublic static boolean createSet(java.lang.String setName,
java.lang.String description)
throws TVCException
TVCExceptionpublic static boolean createSet(java.lang.String user,
java.lang.String setName,
java.lang.String description)
throws TVCException
TVCExceptionpublic static java.lang.String getDescription(java.lang.String setName)
throws TVCException
setName - The name of the set.TVCExceptionpublic static void setDescription(java.lang.String setName,
java.lang.String description)
throws TVCException
setName - The name of the set.description - The description to set.TVCExceptionpublic static void setDescription(java.lang.String user,
java.lang.String setName,
java.lang.String description)
throws TVCException
TVCExceptionpublic static java.lang.String getProperty(java.lang.String setName,
java.lang.String propertyName)
throws TVCException
setName - The name of the set.propertyName - The name of the property.TVCException - If unable to get the property value.public static void setProperty(java.lang.String setName,
java.lang.String propertyName,
java.lang.String propertyValue)
throws TVCException
setName - The name of the set.propertyName - The name of the property.propertyValue - The value.TVCException - If unable to set the property value.public static void setProperty(java.lang.String user,
java.lang.String setName,
java.lang.String propertyName,
java.lang.String propertyValue)
throws TVCException
user - The user that owns the set.setName - The name of the set.propertyName - The name of the property.propertyValue - The value.TVCException - If unable to set the property value.public static void changeName(java.lang.String setName,
java.lang.String newSetName)
throws TVCException
setName - newSetName - TVCExceptionpublic static void distribute(java.lang.String setName,
java.lang.String newName,
java.lang.String toUser,
boolean overwrite)
throws TVCException
setName - The name of the set to distributetoUser - The user to whome the set will be distributednewName - The new name, or null if to auto-generate the new name.overwrite - True to overwrite existing.TVCException - If unable to distribute the Set.public static void validateName(java.lang.String name)
throws TVCException
TVCExceptionCopyright ? Technia AB. All Rights Reserved.