Package org.apache.syncope.common.lib
Class AnyOperations
- java.lang.Object
-
- org.apache.syncope.common.lib.AnyOperations
-
public final class AnyOperations extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cleanEmptyAttrs(AnyTO anyTO, AnyUR anyUR)
Add PLAIN attribute DELETE patch for those attributes of the input AnyTO without values or containing null valuestatic AnyObjectUR
diff(AnyObjectTO updated, AnyObjectTO original, boolean incremental)
Calculate modifications needed by first in order to be equal to second.static GroupUR
diff(GroupTO updated, GroupTO original, boolean incremental)
Calculate modifications needed by first in order to be equal to second.static UserUR
diff(UserTO updated, UserTO original, boolean incremental)
Calculate modifications needed by first in order to be equal to second.static <TO extends AnyTO,P extends AnyUR>
Pdiff(TO updated, TO original, boolean incremental)
static AnyObjectTO
patch(AnyObjectTO anyObjectTO, AnyObjectUR anyObjectUR)
static AnyTO
patch(AnyTO anyTO, AnyUR anyUR)
static GroupTO
patch(GroupTO groupTO, GroupUR groupUR)
static UserTO
patch(UserTO userTO, UserUR userUR)
-
-
-
Method Detail
-
diff
public static AnyObjectUR diff(AnyObjectTO updated, AnyObjectTO original, boolean incremental)
Calculate modifications needed by first in order to be equal to second.- Parameters:
updated
- updated AnyObjectTOoriginal
- original AnyObjectTOincremental
- perform incremental diff (without removing existing info)- Returns:
AnyObjectUR
containing differences
-
diff
public static UserUR diff(UserTO updated, UserTO original, boolean incremental)
Calculate modifications needed by first in order to be equal to second.- Parameters:
updated
- updated UserTOoriginal
- original UserTOincremental
- perform incremental diff (without removing existing info)- Returns:
UserUR
containing differences
-
diff
public static GroupUR diff(GroupTO updated, GroupTO original, boolean incremental)
Calculate modifications needed by first in order to be equal to second.- Parameters:
updated
- updated GroupTOoriginal
- original GroupTOincremental
- perform incremental diff (without removing existing info)- Returns:
GroupUR
containing differences
-
diff
public static <TO extends AnyTO,P extends AnyUR> P diff(TO updated, TO original, boolean incremental)
-
patch
public static AnyObjectTO patch(AnyObjectTO anyObjectTO, AnyObjectUR anyObjectUR)
-
cleanEmptyAttrs
public static void cleanEmptyAttrs(AnyTO anyTO, AnyUR anyUR)
Add PLAIN attribute DELETE patch for those attributes of the input AnyTO without values or containing null value- Parameters:
anyTO
- User, Group or Any Object to look for attributes with no valueanyUR
- update req to enrich with DELETE statements
-
-