public class RemovableUtil
extends java.lang.Object
Constructor and Description |
---|
RemovableUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
delete(DbControl dc,
Item itemType,
java.util.Set<java.lang.Integer> items) |
private static int[] |
removeAnyToAnyLinkedTo(DbControl dc,
ItemQuery<AnyToAny> any2AnyQuery,
boolean removed) |
private static int[] |
removeDependingItems(DbControl dc,
Removable item,
boolean removed)
Sets the removed-flag for all subitems to a parent
|
private static int[] |
removeFileSetMembers(DbControl dc,
FileStoreEnabled fileStore,
boolean removed) |
static int[] |
removeRecursively(DbControl dc,
Item itemType,
java.util.Set<java.lang.Integer> items,
boolean removed)
Set the removed flag for selected items, including the subitems.
|
private static int[] |
restorePath(Directory parentDir)
Restores the path to a directory
|
static int |
setRemoved(DbControl dc,
Item itemType,
java.util.Set<java.lang.Integer> items,
boolean removed) |
private static boolean |
setRemovedFlag(Removable item,
boolean removed) |
private static int[] |
sumArrays(int[] baseArray,
int[] newResult) |
public static int setRemoved(DbControl dc, Item itemType, java.util.Set<java.lang.Integer> items, boolean removed) throws BaseException
BaseException
public static int[] removeRecursively(DbControl dc, Item itemType, java.util.Set<java.lang.Integer> items, boolean removed) throws BaseException
dc
- The database control to use when accessing the databaseitemType
- The itemType to deleteitems
- A set of ids from the items that shall be deleted.removed
- True if the items should be deleted. False if the items should be restored.BaseException
- If there is an errorpublic static int delete(DbControl dc, Item itemType, java.util.Set<java.lang.Integer> items) throws BaseException
BaseException
private static int[] restorePath(Directory parentDir)
parentDir
- The Directory that is being restoredprivate static int[] removeDependingItems(DbControl dc, Removable item, boolean removed) throws BaseException
dc
- The DbControl
wich will be used for database accessitem
- Parent of the subitems that shall be removedremoved
- True if the subitems should be flagged removed.
False if the subitems should be restoredBaseException
- If there is an errorprivate static boolean setRemovedFlag(Removable item, boolean removed)
private static int[] sumArrays(int[] baseArray, int[] newResult)
private static int[] removeAnyToAnyLinkedTo(DbControl dc, ItemQuery<AnyToAny> any2AnyQuery, boolean removed)
private static int[] removeFileSetMembers(DbControl dc, FileStoreEnabled fileStore, boolean removed)