You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/07/26 11:48:08 UTC
svn commit: r1507238 [1/4] - in /syncope/trunk:
common/src/main/java/org/apache/syncope/common/mod/
common/src/main/java/org/apache/syncope/common/report/
common/src/main/java/org/apache/syncope/common/to/
common/src/main/java/org/apache/syncope/common...
Author: ilgrosso
Date: Fri Jul 26 09:48:07 2013
New Revision: 1507238
URL: http://svn.apache.org/r1507238
Log:
[SYNCOPE-246] Collection setters removed from transfer objects + provided custom BeanUtils for handling bean collection properties copy
Added:
syncope/trunk/common/src/main/java/org/apache/syncope/common/util/BeanUtils.java (with props)
Modified:
syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/UserMod.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationRequestTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestOptionsTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java
syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
syncope/trunk/common/src/test/java/org/apache/syncope/common/JSONTest.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttributesPanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/MembershipsPanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ReportModalPage.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AttributesPanel.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.html
syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/PasswordGenerator.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/policy/PolicyEvaluator.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/PropagationManager.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnectorController.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/NotificationDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ReportDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ResourceDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/RoleDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserRequestDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ConnInstanceTest.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AuthenticationTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ConnInstanceTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ReportTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ResourceTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/RoleTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/SchemaTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/sync/TestSyncActions.java
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java Fri Jul 26 09:48:07 2013
@@ -76,30 +76,10 @@ public abstract class AbstractAttributab
return id;
}
- public void setId(long id) {
+ public void setId(final long id) {
this.id = id;
}
- /**
- * Convenience method for removing entire attribute instead removing each value in an AttributeMod object
- *
- * @param name (schema) of attribute to be removed.
- * @return true on success.
- */
- public boolean addAttributeToBeRemoved(String attribute) {
- return attributesToBeRemoved.add(attribute);
- }
-
- /**
- * Convenience method for removing entire attribute instead removing each value in an AttributeMod object
- *
- * @param name (schema) of attribute to be removed.
- * @return true on success.
- */
- public boolean removeAttributeToBeRemoved(String attribute) {
- return attributesToBeRemoved.remove(attribute);
- }
-
@XmlElementWrapper(name = "attributesToBeRemoved")
@XmlElement(name = "attribute")
@JsonProperty("attributesToBeRemoved")
@@ -107,32 +87,6 @@ public abstract class AbstractAttributab
return attributesToBeRemoved;
}
- public void setAttributesToBeRemoved(Set<String> attributesToBeRemoved) {
- this.attributesToBeRemoved = attributesToBeRemoved;
- }
-
- /**
- * Add an attribute modification object. AttributeMod itself indicates how the attribute should be modified.
- *
- * @param attribute modification object
- * @see AttributeMod
- * @return true on success
- */
- public boolean addAttributeToBeUpdated(AttributeMod attribute) {
- return attributesToBeUpdated.add(attribute);
- }
-
- /**
- * Remove an attribute modification object. AttributeMod itself indicates how the attribute should be modified.
- *
- * @param attribute modification object
- * @see AttributeMod
- * @return true on success
- */
- public boolean removeAttributeToBeUpdated(AttributeMod attribute) {
- return attributesToBeUpdated.remove(attribute);
- }
-
@XmlElementWrapper(name = "attributesToBeUpdated")
@XmlElement(name = "attributeMod")
@JsonProperty("attributesToBeUpdated")
@@ -140,31 +94,6 @@ public abstract class AbstractAttributab
return attributesToBeUpdated;
}
- public void setAttributesToBeUpdated(Set<AttributeMod> attributesToBeUpdated) {
- this.attributesToBeUpdated = attributesToBeUpdated;
- }
-
- /**
- * Add an attribute modification object. AttributeMod itself indicates how the attribute should be modified.
- *
- * @param attribute modification object
- * @see AttributeMod
- * @return true on success
- */
- public boolean addDerivedAttributeToBeAdded(String derivedAttribute) {
- return derivedAttributesToBeAdded.add(derivedAttribute);
- }
-
- /**
- * Add a derivedattribute. Value is calculated by its definition.
- *
- * @param derivedAttribute
- * @return true on success
- */
- public boolean removeDerivedAttributeToBeAdded(String derivedAttribute) {
- return derivedAttributesToBeAdded.remove(derivedAttribute);
- }
-
@XmlElementWrapper(name = "derivedAttributesToBeAdded")
@XmlElement(name = "attributeName")
@JsonProperty("derivedAttributesToBeAdded")
@@ -172,19 +101,6 @@ public abstract class AbstractAttributab
return derivedAttributesToBeAdded;
}
- public void setDerivedAttributesToBeAdded(Set<String> derivedAttributesToBeAdded) {
-
- this.derivedAttributesToBeAdded = derivedAttributesToBeAdded;
- }
-
- public boolean addDerivedAttributeToBeRemoved(String derivedAttribute) {
- return derivedAttributesToBeRemoved.add(derivedAttribute);
- }
-
- public boolean removeDerivedAttributeToBeRemoved(String derivedAttribute) {
- return derivedAttributesToBeRemoved.remove(derivedAttribute);
- }
-
@XmlElementWrapper(name = "derivedAttributesToBeRemoved")
@XmlElement(name = "attribute")
@JsonProperty("derivedAttributesToBeRemoved")
@@ -192,11 +108,6 @@ public abstract class AbstractAttributab
return derivedAttributesToBeRemoved;
}
- public void setDerivedAttributesToBeRemoved(Set<String> derivedAttributesToBeRemoved) {
-
- this.derivedAttributesToBeRemoved = derivedAttributesToBeRemoved;
- }
-
@XmlElementWrapper(name = "virtualAttributesToBeRemoved")
@XmlElement(name = "attribute")
@JsonProperty("virtualAttributesToBeRemoved")
@@ -204,31 +115,6 @@ public abstract class AbstractAttributab
return virtualAttributesToBeRemoved;
}
- public boolean addVirtualAttributeToBeRemoved(String virtualAttributeToBeRemoved) {
-
- return virtualAttributesToBeRemoved.add(virtualAttributeToBeRemoved);
- }
-
- public boolean removeVirtualAttributeToBeRemoved(String virtualAttributeToBeRemoved) {
-
- return virtualAttributesToBeRemoved.remove(virtualAttributeToBeRemoved);
- }
-
- public void setVirtualAttributesToBeRemoved(Set<String> virtualAttributesToBeRemoved) {
-
- this.virtualAttributesToBeRemoved = virtualAttributesToBeRemoved;
- }
-
- public boolean addVirtualAttributeToBeUpdated(AttributeMod virtualAttributeToBeUpdated) {
-
- return virtualAttributesToBeUpdated.add(virtualAttributeToBeUpdated);
- }
-
- public boolean removeVirtualAttributeToBeUpdated(AttributeMod virtualAttributeToBeUpdated) {
-
- return virtualAttributesToBeUpdated.remove(virtualAttributeToBeUpdated);
- }
-
@XmlElementWrapper(name = "virtualAttributesToBeUpdated")
@XmlElement(name = "attribute")
@JsonProperty("virtualAttributesToBeUpdated")
@@ -236,19 +122,6 @@ public abstract class AbstractAttributab
return virtualAttributesToBeUpdated;
}
- public void setVirtualAttributesToBeUpdated(Set<AttributeMod> virtualAttributesToBeUpdated) {
-
- this.virtualAttributesToBeUpdated = virtualAttributesToBeUpdated;
- }
-
- public boolean addResourceToBeAdded(String resource) {
- return resourcesToBeAdded.add(resource);
- }
-
- public boolean removeResourceToBeAdded(String resource) {
- return resourcesToBeAdded.remove(resource);
- }
-
@XmlElementWrapper(name = "resourcesToBeAdded")
@XmlElement(name = "resource")
@JsonProperty("resourcesToBeAdded")
@@ -256,18 +129,6 @@ public abstract class AbstractAttributab
return resourcesToBeAdded;
}
- public void setResourcesToBeAdded(Set<String> resourcesToBeAdded) {
- this.resourcesToBeAdded = resourcesToBeAdded;
- }
-
- public boolean addResourceToBeRemoved(String resource) {
- return resourcesToBeRemoved.add(resource);
- }
-
- public boolean removeResourceToBeRemoved(String resource) {
- return resourcesToBeRemoved.remove(resource);
- }
-
@XmlElementWrapper(name = "resourcesToBeRemoved")
@XmlElement(name = "resource")
@JsonProperty("resourcesToBeRemoved")
@@ -275,10 +136,6 @@ public abstract class AbstractAttributab
return resourcesToBeRemoved;
}
- public void setResourcesToBeRemoved(Set<String> resourcesToBeRemoved) {
- this.resourcesToBeRemoved = resourcesToBeRemoved;
- }
-
/**
* @return true is all backing Sets are empty.
*/
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java Fri Jul 26 09:48:07 2013
@@ -57,14 +57,6 @@ public class AttributeMod extends Abstra
this.schema = schema;
}
- public boolean addValueToBeAdded(String value) {
- return valuesToBeAdded.add(value);
- }
-
- public boolean removeValueToBeAdded(String value) {
- return valuesToBeAdded.remove(value);
- }
-
@XmlElementWrapper(name = "valuesToBeAdded")
@XmlElement(name = "value")
@JsonProperty("valuesToBeAdded")
@@ -72,18 +64,6 @@ public class AttributeMod extends Abstra
return valuesToBeAdded;
}
- public void setValuesToBeAdded(List<String> valuesToBeAdded) {
- this.valuesToBeAdded = valuesToBeAdded;
- }
-
- public boolean addValueToBeRemoved(String value) {
- return valuesToBeRemoved.add(value);
- }
-
- public boolean removeValueToBeRemoved(String value) {
- return valuesToBeRemoved.remove(value);
- }
-
@XmlElementWrapper(name = "valuesToBeRemoved")
@XmlElement(name = "value")
@JsonProperty("valuesToBeRemoved")
@@ -91,10 +71,6 @@ public class AttributeMod extends Abstra
return valuesToBeRemoved;
}
- public void setValuesToBeRemoved(List<String> valuesToBeRemoved) {
- this.valuesToBeRemoved = valuesToBeRemoved;
- }
-
@JsonIgnore
public boolean isEmpty() {
return valuesToBeAdded.isEmpty() && valuesToBeRemoved.isEmpty();
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java Fri Jul 26 09:48:07 2013
@@ -44,16 +44,6 @@ public class MembershipMod extends Abstr
this.role = role;
}
- @Override
- public boolean addResourceToBeAdded(String resource) {
- return false;
- }
-
- @Override
- public boolean addResourceToBeRemoved(String resource) {
- return false;
- }
-
@XmlElementWrapper(name = "resourcesToBeAdded")
@XmlElement(name = "resource")
@JsonProperty("resourcesToBeAdded")
@@ -70,24 +60,6 @@ public class MembershipMod extends Abstr
return Collections.emptySet();
}
- @Override
- public boolean removeResourceToBeAdded(String resource) {
- return false;
- }
-
- @Override
- public boolean removeResourceToBeRemoved(String resource) {
- return false;
- }
-
- @Override
- public void setResourcesToBeAdded(Set<String> resourcesToBeAdded) {
- }
-
- @Override
- public void setResourcesToBeRemoved(Set<String> resourcesToBeRemoved) {
- }
-
@JsonIgnore
@Override
public boolean isEmpty() {
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java Fri Jul 26 09:48:07 2013
@@ -48,7 +48,7 @@ public class ReferenceMod extends Abstra
return id;
}
- public void setId(Long id) {
+ public void setId(final Long id) {
this.id = id;
}
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java Fri Jul 26 09:48:07 2013
@@ -20,6 +20,7 @@ package org.apache.syncope.common.mod;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
@@ -51,7 +52,9 @@ public class RoleMod extends AbstractAtt
private Boolean inheritPasswordPolicy;
- private List<String> entitlements;
+ private boolean modEntitlements;
+
+ private List<String> entitlements = new ArrayList<String>();
private ReferenceMod passwordPolicy;
@@ -113,6 +116,14 @@ public class RoleMod extends AbstractAtt
this.inheritVirtualAttributes = inheritVirtualAttributes;
}
+ public boolean isModEntitlements() {
+ return modEntitlements;
+ }
+
+ public void setModEntitlements(final boolean modEntitlements) {
+ this.modEntitlements = modEntitlements;
+ }
+
@XmlElementWrapper(name = "entitlements")
@XmlElement(name = "entitlement")
@JsonProperty("entitlements")
@@ -120,10 +131,6 @@ public class RoleMod extends AbstractAtt
return entitlements;
}
- public void setEntitlements(final List<String> entitlements) {
- this.entitlements = entitlements;
- }
-
public ReferenceMod getPasswordPolicy() {
return passwordPolicy;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/UserMod.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/UserMod.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/UserMod.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/UserMod.java Fri Jul 26 09:48:07 2013
@@ -74,23 +74,6 @@ public class UserMod extends AbstractAtt
return membershipsToBeAdded;
}
- public boolean addMembershipToBeAdded(final MembershipMod membershipMod) {
- return membershipsToBeAdded.add(membershipMod);
- }
-
- public boolean removeMembershipToBeAdded(final MembershipMod membershipMod) {
- return membershipsToBeAdded.remove(membershipMod);
- }
-
- public void setMembershipsToBeAdded(final Set<MembershipMod> membershipsToBeAdded) {
- if (this.membershipsToBeAdded != membershipsToBeAdded) {
- this.membershipsToBeAdded.clear();
- if (membershipsToBeAdded != null && !membershipsToBeAdded.isEmpty()) {
- this.membershipsToBeAdded.addAll(membershipsToBeAdded);
- }
- }
- }
-
@XmlElementWrapper(name = "membershipsToBeRemoved")
@XmlElement(name = "membership")
@JsonProperty("membershipsToBeRemoved")
@@ -98,23 +81,6 @@ public class UserMod extends AbstractAtt
return membershipsToBeRemoved;
}
- public boolean addMembershipToBeRemoved(final Long membershipToBeRemoved) {
- return membershipsToBeRemoved.add(membershipToBeRemoved);
- }
-
- public boolean removeMembershipToBeRemoved(final Long membershipToBeRemoved) {
- return membershipsToBeRemoved.remove(membershipToBeRemoved);
- }
-
- public void setMembershipsToBeRemoved(final Set<Long> membershipsToBeRemoved) {
- if (this.membershipsToBeRemoved != membershipsToBeRemoved) {
- this.membershipsToBeRemoved.clear();
- if (membershipsToBeRemoved != null && !membershipsToBeRemoved.isEmpty()) {
- this.membershipsToBeRemoved.addAll(membershipsToBeRemoved);
- }
- }
- }
-
public PropagationRequestTO getPwdPropRequest() {
return pwdPropRequest;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java Fri Jul 26 09:48:07 2013
@@ -84,10 +84,6 @@ public class RoleReportletConf extends A
return attrs;
}
- public void setAttrs(final List<String> attrs) {
- this.attrs = attrs;
- }
-
@XmlElementWrapper(name = "derivedAttributes")
@XmlElement(name = "attribute")
@JsonProperty("derivedAttributes")
@@ -95,8 +91,11 @@ public class RoleReportletConf extends A
return derAttrs;
}
- public void setDerAttrs(final List<String> derAttrs) {
- this.derAttrs = derAttrs;
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<String> getVirAttrs() {
+ return virAttrs;
}
@XmlElementWrapper(name = "features")
@@ -106,10 +105,6 @@ public class RoleReportletConf extends A
return features;
}
- public void setFeatures(final List<Feature> features) {
- this.features = features;
- }
-
public NodeCond getMatchingCond() {
return matchingCond;
}
@@ -117,15 +112,4 @@ public class RoleReportletConf extends A
public void setMatchingCond(final NodeCond matchingCond) {
this.matchingCond = matchingCond;
}
-
- @XmlElementWrapper(name = "virtualAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("virtualAttributes")
- public List<String> getVirAttrs() {
- return virAttrs;
- }
-
- public void setVirAttrs(final List<String> virAttrs) {
- this.virAttrs = virAttrs;
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java Fri Jul 26 09:48:07 2013
@@ -84,10 +84,6 @@ public class StaticReportletConf extends
return listField;
}
- public void setListField(List<String> listField) {
- this.listField = listField;
- }
-
public Long getLongField() {
return longField;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java Fri Jul 26 09:48:07 2013
@@ -59,15 +59,15 @@ public class UserReportletConf extends A
private NodeCond matchingCond;
@FormAttributeField(schema = IntMappingType.UserSchema)
- private List<String> attrs;
+ private List<String> attrs = new ArrayList<String>();
@FormAttributeField(schema = IntMappingType.UserDerivedSchema)
- private List<String> derAttrs;
+ private List<String> derAttrs = new ArrayList<String>();
@FormAttributeField(schema = IntMappingType.UserVirtualSchema)
- private List<String> virAttrs;
+ private List<String> virAttrs = new ArrayList<String>();
- private List<Feature> features;
+ private List<Feature> features = new ArrayList<Feature>();
public UserReportletConf() {
super();
@@ -75,11 +75,6 @@ public class UserReportletConf extends A
public UserReportletConf(final String name) {
super(name);
-
- attrs = new ArrayList<String>();
- derAttrs = new ArrayList<String>();
- virAttrs = new ArrayList<String>();
- features = new ArrayList<Feature>();
}
@XmlElementWrapper(name = "attributes")
@@ -89,10 +84,6 @@ public class UserReportletConf extends A
return attrs;
}
- public void setAttrs(final List<String> attrs) {
- this.attrs = attrs;
- }
-
@XmlElementWrapper(name = "derivedAttributes")
@XmlElement(name = "attribute")
@JsonProperty("derivedAttributes")
@@ -100,8 +91,11 @@ public class UserReportletConf extends A
return derAttrs;
}
- public void setDerAttrs(final List<String> derAttrs) {
- this.derAttrs = derAttrs;
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ @JsonProperty("virtualAttributes")
+ public List<String> getVirAttrs() {
+ return virAttrs;
}
@XmlElementWrapper(name = "features")
@@ -111,10 +105,6 @@ public class UserReportletConf extends A
return features;
}
- public void setFeatures(final List<Feature> features) {
- this.features = features;
- }
-
public NodeCond getMatchingCond() {
return matchingCond;
}
@@ -122,15 +112,4 @@ public class UserReportletConf extends A
public void setMatchingCond(final NodeCond matchingCond) {
this.matchingCond = matchingCond;
}
-
- @XmlElementWrapper(name = "virtualAttributes")
- @XmlElement(name = "attribute")
- @JsonProperty("virtualAttributes")
- public List<String> getVirAttrs() {
- return virAttrs;
- }
-
- public void setVirAttrs(final List<String> virAttrs) {
- this.virAttrs = virAttrs;
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java Fri Jul 26 09:48:07 2013
@@ -97,14 +97,6 @@ public abstract class AbstractAttributab
return result;
}
- public boolean addDerivedAttribute(final AttributeTO derivedAttribute) {
- return derivedAttributes.add(derivedAttribute);
- }
-
- public boolean removeDerivedAttribute(final AttributeTO derivedAttribute) {
- return derivedAttributes.remove(derivedAttribute);
- }
-
@XmlElementWrapper(name = "derivedAttributes")
@XmlElement(name = "attribute")
@JsonProperty("derivedAttributes")
@@ -112,18 +104,6 @@ public abstract class AbstractAttributab
return derivedAttributes;
}
- public void setDerivedAttributes(final List<AttributeTO> derivedAttributes) {
- this.derivedAttributes = derivedAttributes;
- }
-
- public boolean addVirtualAttribute(final AttributeTO virtualAttribute) {
- return virtualAttributes.add(virtualAttribute);
- }
-
- public boolean removeVirtualAttribute(final AttributeTO virtualAttribute) {
- return virtualAttributes.remove(virtualAttribute);
- }
-
@XmlElementWrapper(name = "virtualAttributes")
@XmlElement(name = "attribute")
@JsonProperty("virtualAttributes")
@@ -131,18 +111,6 @@ public abstract class AbstractAttributab
return virtualAttributes;
}
- public void setVirtualAttributes(final List<AttributeTO> virtualAttributes) {
- this.virtualAttributes = virtualAttributes;
- }
-
- public boolean addResource(final String resource) {
- return resources.add(resource);
- }
-
- public boolean removeResource(final String resource) {
- return resources.remove(resource);
- }
-
@XmlElementWrapper(name = "resources")
@XmlElement(name = "resource")
@JsonProperty("resources")
@@ -150,14 +118,6 @@ public abstract class AbstractAttributab
return resources;
}
- public void setResources(final Set<String> resources) {
- this.resources = resources;
- }
-
- public boolean addPropagationTO(final PropagationStatusTO status) {
- return propagationStatusTOs.add(status);
- }
-
public boolean removePropagationTO(final String resource) {
if (resource != null && getPropagationStatusTOs().isEmpty()) {
final List<PropagationStatusTO> toBeRemoved = new ArrayList<PropagationStatusTO>();
@@ -179,11 +139,4 @@ public abstract class AbstractAttributab
public List<PropagationStatusTO> getPropagationStatusTOs() {
return propagationStatusTOs;
}
-
- public void setPropagationStatusTOs(final List<PropagationStatusTO> propagationStatusTOs) {
- if (this.propagationStatusTOs != propagationStatusTOs) {
- this.propagationStatusTOs.clear();
- this.propagationStatusTOs.addAll(propagationStatusTOs);
- }
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java Fri Jul 26 09:48:07 2013
@@ -68,14 +68,6 @@ public abstract class AbstractTaskTO ext
this.latestExecStatus = latestExecStatus;
}
- public boolean addExecution(final TaskExecTO execution) {
- return executions.add(execution);
- }
-
- public boolean removeExecution(final TaskExecTO execution) {
- return executions.remove(execution);
- }
-
@XmlElementWrapper(name = "excecutions")
@XmlElement(name = "excecution")
@JsonProperty("excecutions")
@@ -83,10 +75,6 @@ public abstract class AbstractTaskTO ext
return executions;
}
- public void setExecutions(final List<TaskExecTO> executions) {
- this.executions = executions;
- }
-
public Date getStartDate() {
return startDate == null
? null
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java Fri Jul 26 09:48:07 2013
@@ -75,26 +75,6 @@ public class AttributeTO extends Abstrac
}
/**
- * @param value an attribute value to be added
- * @return whether the operation succeeded or not
- */
- public boolean addValue(final String value) {
- return value == null || isReadonly()
- ? false
- : values.add(value);
- }
-
- /**
- * @param value an attribute value to be removed
- * @return whether the operation succeeded or not
- */
- public boolean removeValue(final String value) {
- return value == null || isReadonly()
- ? false
- : values.remove(value);
- }
-
- /**
* @return attribute values as strings
*/
@XmlElementWrapper(name = "values")
@@ -104,15 +84,6 @@ public class AttributeTO extends Abstrac
return values;
}
- /**
- * @param values set of (string) values
- */
- public void setValues(final List<String> values) {
- if (!isReadonly()) {
- this.values = values;
- }
- }
-
public boolean isReadonly() {
return readonly;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java Fri Jul 26 09:48:07 2013
@@ -94,16 +94,4 @@ public class ConnBundleTO extends Abstra
public void setVersion(final String version) {
this.version = version;
}
-
- public void setProperties(final List<ConnConfPropSchema> properties) {
- this.properties = properties;
- }
-
- public boolean addProperty(final ConnConfPropSchema property) {
- return properties.add(property);
- }
-
- public boolean removeProperty(final ConnConfPropSchema property) {
- return properties.remove(property);
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java Fri Jul 26 09:48:07 2013
@@ -129,31 +129,6 @@ public class ConnInstanceTO extends Abst
return result;
}
- public boolean addConfiguration(final ConnConfProperty property) {
- return this.configuration.add(property);
- }
-
- public boolean removeConfiguration(final ConnConfProperty property) {
- return this.configuration.remove(property);
- }
-
- public void setConfiguration(final Set<ConnConfProperty> configuration) {
- if (this.configuration != configuration) {
- this.configuration.clear();
- if (configuration != null && !configuration.isEmpty()) {
- this.configuration.addAll(configuration);
- }
- }
- }
-
- public boolean addCapability(final ConnectorCapability capability) {
- return capabilities.add(capability);
- }
-
- public boolean removeCapability(final ConnectorCapability capability) {
- return capabilities.remove(capability);
- }
-
@XmlElementWrapper(name = "capabilities")
@XmlElement(name = "capability")
@JsonProperty("capabilities")
@@ -161,15 +136,6 @@ public class ConnInstanceTO extends Abst
return capabilities;
}
- public void setCapabilities(final Set<ConnectorCapability> capabilities) {
- if (this.capabilities != capabilities) {
- this.capabilities.clear();
- if (capabilities != null && !capabilities.isEmpty()) {
- this.capabilities.addAll(capabilities);
- }
- }
- }
-
public String getDisplayName() {
return displayName;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java Fri Jul 26 09:48:07 2013
@@ -36,21 +36,7 @@ public class ConnObjectTO extends Abstra
private static final long serialVersionUID = 5139554911265442497L;
- private List<AttributeTO> attributes;
-
- public ConnObjectTO() {
- super();
-
- attributes = new ArrayList<AttributeTO>();
- }
-
- public boolean addAttribute(final AttributeTO attribute) {
- return attributes.add(attribute);
- }
-
- public boolean removeAttribute(final AttributeTO attribute) {
- return attributes.remove(attribute);
- }
+ private List<AttributeTO> attributes = new ArrayList<AttributeTO>();
@XmlElementWrapper(name = "attributes")
@XmlElement(name = "attribute")
@@ -59,10 +45,6 @@ public class ConnObjectTO extends Abstra
return attributes;
}
- public void setAttributes(final List<AttributeTO> attributes) {
- this.attributes = attributes;
- }
-
@JsonIgnore
public Map<String, AttributeTO> getAttributeMap() {
Map<String, AttributeTO> result;
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java Fri Jul 26 09:48:07 2013
@@ -20,7 +20,6 @@ package org.apache.syncope.common.to;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
@@ -39,13 +38,7 @@ public class MappingTO extends AbstractB
private String accountLink;
- private final List<MappingItemTO> items;
-
- public MappingTO() {
- super();
-
- items = new ArrayList<MappingItemTO>();
- }
+ private final List<MappingItemTO> items = new ArrayList<MappingItemTO>();
public String getAccountLink() {
return accountLink;
@@ -127,13 +120,4 @@ public class MappingTO extends AbstractB
public boolean removeItem(final MappingItemTO item) {
return this.items.remove(item);
}
-
- public void setItems(final Collection<MappingItemTO> items) {
- if (this.items != items) {
- this.items.clear();
- if (items != null && !items.isEmpty()) {
- this.items.addAll(items);
- }
- }
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java Fri Jul 26 09:48:07 2013
@@ -55,16 +55,6 @@ public class MembershipTO extends Abstra
}
@Override
- public boolean addResource(String resource) {
- return false;
- }
-
- @Override
- public boolean removeResource(String resource) {
- return false;
- }
-
- @Override
@XmlElementWrapper(name = "resources")
@XmlElement(name = "resource")
@JsonProperty("resources")
@@ -73,25 +63,7 @@ public class MembershipTO extends Abstra
}
@Override
- public void setResources(Set<String> resources) {
- }
-
- @Override
- public boolean addPropagationTO(PropagationStatusTO status) {
- return false;
- }
-
- @Override
- public boolean removePropagationTO(String resource) {
- return false;
- }
-
- @Override
public List<PropagationStatusTO> getPropagationStatusTOs() {
return Collections.<PropagationStatusTO>emptyList();
}
-
- @Override
- public void setPropagationStatusTOs(List<PropagationStatusTO> propagationTOs) {
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java Fri Jul 26 09:48:07 2013
@@ -40,7 +40,7 @@ public class NotificationTO extends Abst
private Long id;
- private List<String> events;
+ private List<String> events = new ArrayList<String>();
private NodeCond about;
@@ -60,15 +60,11 @@ public class NotificationTO extends Abst
private TraceLevel traceLevel;
- public NotificationTO() {
- events = new ArrayList<String>();
- }
-
public NodeCond getAbout() {
return about;
}
- public void setAbout(NodeCond about) {
+ public void setAbout(final NodeCond about) {
this.about = about;
}
@@ -79,18 +75,6 @@ public class NotificationTO extends Abst
return events;
}
- public boolean addEvent(final String event) {
- return event != null && !events.contains(event) && events.add(event);
- }
-
- public boolean removeEvent(final String event) {
- return event != null && events.remove(event);
- }
-
- public void setEvents(List<String> events) {
- this.events = events;
- }
-
public Long getId() {
return id;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java Fri Jul 26 09:48:07 2013
@@ -56,23 +56,6 @@ public class NotificationTaskTO extends
return recipients;
}
- public boolean addRecipient(final String recipient) {
- return recipients.add(recipient);
- }
-
- public boolean removeRecipient(final String recipient) {
- return recipients.remove(recipient);
- }
-
- public void setRecipients(final Set<String> recipients) {
- if (this.recipients != recipients) {
- this.recipients.clear();
- if (recipients != null) {
- this.recipients.addAll(recipients);
- }
- }
- }
-
public String getSender() {
return sender;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationRequestTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationRequestTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationRequestTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationRequestTO.java Fri Jul 26 09:48:07 2013
@@ -66,21 +66,4 @@ public class PropagationRequestTO extend
public Set<String> getResources() {
return resources;
}
-
- public boolean addResource(final String resource) {
- return this.resources.add(resource);
- }
-
- public boolean removeResource(final String resource) {
- return this.resources.remove(resource);
- }
-
- public void setResources(final Set<String> resources) {
- if (this.resources != resources) {
- this.resources.clear();
- if (resources != null && !resources.isEmpty()) {
- this.resources.addAll(resources);
- }
- }
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java Fri Jul 26 09:48:07 2013
@@ -21,7 +21,7 @@ package org.apache.syncope.common.to;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-@XmlRootElement(name = "executionReport")
+@XmlRootElement(name = "reportExec")
@XmlType
public class ReportExecTO extends AbstractExecTO {
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java Fri Jul 26 09:48:07 2013
@@ -45,11 +45,11 @@ public class ReportTO extends AbstractBa
private String name;
- private List<AbstractReportletConf> reportletConfs;
+ private List<AbstractReportletConf> reportletConfs = new ArrayList<AbstractReportletConf>();
private String cronExpression;
- private List<ReportExecTO> executions;
+ private List<ReportExecTO> executions = new ArrayList<ReportExecTO>();
private String latestExecStatus;
@@ -61,13 +61,6 @@ public class ReportTO extends AbstractBa
private Date endDate;
- public ReportTO() {
- super();
-
- reportletConfs = new ArrayList<AbstractReportletConf>();
- executions = new ArrayList<ReportExecTO>();
- }
-
public long getId() {
return id;
}
@@ -84,14 +77,6 @@ public class ReportTO extends AbstractBa
this.name = name;
}
- public boolean addReportletConf(AbstractReportletConf reportlet) {
- return this.reportletConfs.add(reportlet);
- }
-
- public boolean removeReportletConf(AbstractReportletConf reportlet) {
- return this.reportletConfs.remove(reportlet);
- }
-
@XmlElementWrapper(name = "reportletConfs")
@XmlElement(name = "reportletConf")
@JsonProperty("reportletConfs")
@@ -99,10 +84,6 @@ public class ReportTO extends AbstractBa
return reportletConfs;
}
- public void setReportletConfs(List<AbstractReportletConf> reportlets) {
- this.reportletConfs = reportlets;
- }
-
public String getCronExpression() {
return cronExpression;
}
@@ -111,14 +92,6 @@ public class ReportTO extends AbstractBa
this.cronExpression = cronExpression;
}
- public boolean addExecution(ReportExecTO execution) {
- return executions.add(execution);
- }
-
- public boolean removeExecution(ReportExecTO execution) {
- return executions.remove(execution);
- }
-
@XmlElementWrapper(name = "executions")
@XmlElement(name = "execution")
@JsonProperty("executions")
@@ -126,10 +99,6 @@ public class ReportTO extends AbstractBa
return executions;
}
- public void setExecutions(List<ReportExecTO> executions) {
- this.executions = executions;
- }
-
public String getLatestExecStatus() {
return latestExecStatus;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java Fri Jul 26 09:48:07 2013
@@ -234,10 +234,6 @@ public class ResourceTO extends Abstract
return connConfProperties;
}
- public void setConnConfProperties(final Set<ConnConfProperty> connConfProperties) {
- this.connConfProperties = connConfProperties;
- }
-
public TraceLevel getSyncTraceLevel() {
return syncTraceLevel;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java Fri Jul 26 09:48:07 2013
@@ -55,18 +55,12 @@ public class RoleTO extends AbstractAttr
private boolean inheritAccountPolicy;
- private final List<String> entitlements;
+ private final List<String> entitlements = new ArrayList<String>();
private Long passwordPolicy;
private Long accountPolicy;
- public RoleTO() {
- super();
-
- entitlements = new ArrayList<String>();
- }
-
public String getName() {
return name;
}
@@ -132,14 +126,6 @@ public class RoleTO extends AbstractAttr
this.inheritVirtualAttributes = inheritVirtualAttributes;
}
- public boolean addEntitlement(final String entitlement) {
- return entitlements.add(entitlement);
- }
-
- public boolean removeEntitlement(final String entitlement) {
- return entitlements.remove(entitlement);
- }
-
@XmlElementWrapper(name = "entitlements")
@XmlElement(name = "entitlement")
@JsonProperty("entitlements")
@@ -147,15 +133,6 @@ public class RoleTO extends AbstractAttr
return entitlements;
}
- public void setEntitlements(final List<String> entitlements) {
- if (this.entitlements != entitlements) {
- this.entitlements.clear();
- if (entitlements != null && !entitlements.isEmpty()) {
- this.entitlements.addAll(entitlements);
- }
- }
- }
-
public Long getPasswordPolicy() {
return passwordPolicy;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java Fri Jul 26 09:48:07 2013
@@ -21,7 +21,7 @@ package org.apache.syncope.common.to;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-@XmlRootElement(name = "taskExecution")
+@XmlRootElement(name = "taskExec")
@XmlType
public class TaskExecTO extends AbstractExecTO {
@@ -33,7 +33,7 @@ public class TaskExecTO extends Abstract
return task;
}
- public void setTask(long task) {
+ public void setTask(final long task) {
this.task = task;
}
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestOptionsTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestOptionsTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestOptionsTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestOptionsTO.java Fri Jul 26 09:48:07 2013
@@ -22,9 +22,10 @@ import javax.xml.bind.annotation.XmlRoot
@XmlRootElement
public class UserRequestOptionsTO {
+
private boolean createAllowed;
- public UserRequestOptionsTO(boolean createAllowed) {
+ public UserRequestOptionsTO(final boolean createAllowed) {
super();
this.createAllowed = createAllowed;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java Fri Jul 26 09:48:07 2013
@@ -40,33 +40,36 @@ public class UserRequestTO extends Abstr
private Long userId;
private UserRequestType type;
-
+
public UserRequestTO() {
}
/**
- * Request to create a user
+ * Request to create an user.
+ *
* @param userTO
*/
- public UserRequestTO(UserTO userTO) {
+ public UserRequestTO(final UserTO userTO) {
this.type = UserRequestType.CREATE;
this.userTO = userTO;
}
/**
- * Request to update a user
+ * Request to update an user.
+ *
* @param userMod
*/
- public UserRequestTO(UserMod userMod) {
+ public UserRequestTO(final UserMod userMod) {
this.userMod = userMod;
this.type = UserRequestType.UPDATE;
}
/**
- * Request to delete a user
+ * Request to delete a user.
+ *
* @param userId
*/
- public UserRequestTO(long userId) {
+ public UserRequestTO(final long userId) {
this.type = UserRequestType.DELETE;
this.userId = userId;
}
@@ -83,7 +86,7 @@ public class UserRequestTO extends Abstr
return type;
}
- public void setType(UserRequestType type) {
+ public void setType(final UserRequestType type) {
this.type = type;
}
@@ -93,7 +96,7 @@ public class UserRequestTO extends Abstr
: userTO;
}
- public void setUserTO(UserTO userTO) {
+ public void setUserTO(final UserTO userTO) {
this.userTO = userTO;
}
@@ -103,7 +106,7 @@ public class UserRequestTO extends Abstr
: userMod;
}
- public void setUserMod(UserMod userMod) {
+ public void setUserMod(final UserMod userMod) {
this.userMod = userMod;
}
@@ -113,7 +116,7 @@ public class UserRequestTO extends Abstr
: userId;
}
- public void setUserId(Long userId) {
+ public void setUserId(final Long userId) {
this.userId = userId;
}
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java Fri Jul 26 09:48:07 2013
@@ -42,7 +42,7 @@ public class UserTO extends AbstractAttr
private String password;
- private List<MembershipTO> memberships;
+ private List<MembershipTO> memberships = new ArrayList<MembershipTO>();
private String status;
@@ -58,12 +58,6 @@ public class UserTO extends AbstractAttr
private Integer failedLogins;
- public UserTO() {
- super();
-
- memberships = new ArrayList<MembershipTO>();
- }
-
public String getPassword() {
return password;
}
@@ -72,14 +66,6 @@ public class UserTO extends AbstractAttr
this.password = password;
}
- public boolean addMembership(final MembershipTO membershipTO) {
- return memberships.add(membershipTO);
- }
-
- public boolean removeMembership(final MembershipTO membershipTO) {
- return memberships.remove(membershipTO);
- }
-
@XmlElementWrapper(name = "memberships")
@XmlElement(name = "membership")
@JsonProperty("memberships")
@@ -87,10 +73,6 @@ public class UserTO extends AbstractAttr
return memberships;
}
- public void setMemberships(final List<MembershipTO> memberships) {
- this.memberships = memberships;
- }
-
@JsonIgnore
public Map<Long, MembershipTO> getMembershipMap() {
Map<Long, MembershipTO> result;
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java Fri Jul 26 09:48:07 2013
@@ -37,7 +37,7 @@ public class WorkflowDefinitionTO extend
return id;
}
- public void setId(String id) {
+ public void setId(final String id) {
this.id = id;
}
@@ -45,8 +45,7 @@ public class WorkflowDefinitionTO extend
return xmlDefinition;
}
- public void setXmlDefinition(String xmlDefinition) {
+ public void setXmlDefinition(final String xmlDefinition) {
this.xmlDefinition = xmlDefinition;
}
-
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java Fri Jul 26 09:48:07 2013
@@ -49,17 +49,13 @@ public class WorkflowFormPropertyTO exte
private String datePattern;
- private Map<String, String> enumValues;
-
- public WorkflowFormPropertyTO() {
- enumValues = new HashMap<String, String>();
- }
+ private Map<String, String> enumValues = new HashMap<String, String>();
public String getId() {
return id;
}
- public void setId(String id) {
+ public void setId(final String id) {
this.id = id;
}
@@ -67,7 +63,7 @@ public class WorkflowFormPropertyTO exte
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -75,7 +71,7 @@ public class WorkflowFormPropertyTO exte
return readable;
}
- public void setReadable(boolean readable) {
+ public void setReadable(final boolean readable) {
this.readable = readable;
}
@@ -83,7 +79,7 @@ public class WorkflowFormPropertyTO exte
return required;
}
- public void setRequired(boolean required) {
+ public void setRequired(final boolean required) {
this.required = required;
}
@@ -91,7 +87,7 @@ public class WorkflowFormPropertyTO exte
return type;
}
- public void setType(WorkflowFormPropertyType type) {
+ public void setType(final WorkflowFormPropertyType type) {
this.type = type;
}
@@ -99,7 +95,7 @@ public class WorkflowFormPropertyTO exte
return value;
}
- public void setValue(String value) {
+ public void setValue(final String value) {
this.value = value;
}
@@ -107,7 +103,7 @@ public class WorkflowFormPropertyTO exte
return writable;
}
- public void setWritable(boolean writable) {
+ public void setWritable(final boolean writable) {
this.writable = writable;
}
@@ -115,25 +111,11 @@ public class WorkflowFormPropertyTO exte
return datePattern;
}
- public void setDatePattern(String datePattern) {
+ public void setDatePattern(final String datePattern) {
this.datePattern = datePattern;
}
public Map<String, String> getEnumValues() {
return enumValues;
}
-
- public void putEnumValue(String key, String value) {
- this.enumValues.put(key, value);
- }
-
- public void removeEnumValue(String key) {
- this.enumValues.remove(key);
- }
-
- public void setEnumValues(Map<String, String> enumValues) {
- if (enumValues != null) {
- this.enumValues = enumValues;
- }
- }
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java Fri Jul 26 09:48:07 2013
@@ -130,10 +130,6 @@ public class AccountPolicySpec extends A
return prefixesNotPermitted;
}
- public void setPrefixesNotPermitted(final List<String> prefixesNotPermitted) {
- this.prefixesNotPermitted = prefixesNotPermitted;
- }
-
@XmlElementWrapper(name = "schemasNotPermitted")
@XmlElement(name = "schema")
@JsonProperty("schemasNotPermitted")
@@ -144,10 +140,6 @@ public class AccountPolicySpec extends A
return schemasNotPermitted;
}
- public void setSchemasNotPermitted(final List<String> schemasNotPermitted) {
- this.schemasNotPermitted = schemasNotPermitted;
- }
-
@XmlElementWrapper(name = "suffixesNotPermitted")
@XmlElement(name = "suffix")
@JsonProperty("suffixesNotPermitted")
@@ -158,10 +150,6 @@ public class AccountPolicySpec extends A
return suffixesNotPermitted;
}
- public void setSuffixesNotPermitted(final List<String> suffixesNotPermitted) {
- this.suffixesNotPermitted = suffixesNotPermitted;
- }
-
@XmlElementWrapper(name = "wordsNotPermitted")
@XmlElement(name = "word")
@JsonProperty("wordsNotPermitted")
@@ -172,10 +160,6 @@ public class AccountPolicySpec extends A
return wordsNotPermitted;
}
- public void setWordsNotPermitted(final List<String> wordsNotPermitted) {
- this.wordsNotPermitted = wordsNotPermitted;
- }
-
public boolean isPropagateSuspension() {
return propagateSuspension;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java Fri Jul 26 09:48:07 2013
@@ -37,7 +37,7 @@ public class ConnConfProperty extends Ab
private ConnConfPropSchema schema;
- private List<?> values = new ArrayList<Object>();
+ private List<Object> values = new ArrayList<Object>();
private boolean overridable;
@@ -52,14 +52,10 @@ public class ConnConfProperty extends Ab
@XmlElementWrapper(name = "values")
@XmlElement(name = "value")
@JsonProperty("values")
- public List<?> getValues() {
+ public List<Object> getValues() {
return values;
}
- public void setValues(final List<?> values) {
- this.values = values;
- }
-
public boolean isOverridable() {
return overridable;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java Fri Jul 26 09:48:07 2013
@@ -56,7 +56,7 @@ public enum EntityViolationType {
private String message;
- private EntityViolationType(final String message) {
+ EntityViolationType(final String message) {
this.message = message;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java Fri Jul 26 09:48:07 2013
@@ -266,10 +266,6 @@ public class PasswordPolicySpec extends
return prefixesNotPermitted;
}
- public void setPrefixesNotPermitted(final List<String> prefixesNotPermitted) {
- this.prefixesNotPermitted = prefixesNotPermitted;
- }
-
@XmlElementWrapper(name = "schemasNotPermitted")
@XmlElement(name = "schema")
@JsonProperty("schemasNotPermitted")
@@ -280,10 +276,6 @@ public class PasswordPolicySpec extends
return schemasNotPermitted;
}
- public void setSchemasNotPermitted(final List<String> schemasNotPermitted) {
- this.schemasNotPermitted = schemasNotPermitted;
- }
-
@XmlElementWrapper(name = "suffixesNotPermitted")
@XmlElement(name = "suffix")
@JsonProperty("suffixesNotPermitted")
@@ -294,10 +286,6 @@ public class PasswordPolicySpec extends
return suffixesNotPermitted;
}
- public void setSuffixesNotPermitted(final List<String> suffixesNotPermitted) {
- this.suffixesNotPermitted = suffixesNotPermitted;
- }
-
public boolean isUppercaseRequired() {
return uppercaseRequired;
}
@@ -316,10 +304,6 @@ public class PasswordPolicySpec extends
return wordsNotPermitted;
}
- public void setWordsNotPermitted(final List<String> wordsNotPermitted) {
- this.wordsNotPermitted = wordsNotPermitted;
- }
-
public boolean isAlphanumericRequired() {
return alphanumericRequired;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java Fri Jul 26 09:48:07 2013
@@ -36,7 +36,7 @@ public class SyncPolicySpec extends Abst
* SyncopeUser attributes and fields for matching during synchronization.
*/
@SchemaList(extended = true)
- private List<String> uAltSearchSchemas;
+ private List<String> uAltSearchSchemas = new ArrayList<String>();
@ClassList
private String userJavaRule;
@@ -45,7 +45,7 @@ public class SyncPolicySpec extends Abst
* SyncopeRole attributes and fields for matching during synchronization.
*/
@SchemaList(extended = true)
- private List<String> rAltSearchSchemas;
+ private List<String> rAltSearchSchemas = new ArrayList<String>();
@ClassList
private String roleJavaRule;
@@ -55,13 +55,6 @@ public class SyncPolicySpec extends Abst
*/
private ConflictResolutionAction conflictResolutionAction;
- public SyncPolicySpec() {
- super();
-
- uAltSearchSchemas = new ArrayList<String>();
- rAltSearchSchemas = new ArrayList<String>();
- }
-
public ConflictResolutionAction getConflictResolutionAction() {
return conflictResolutionAction == null
? ConflictResolutionAction.IGNORE
@@ -79,10 +72,6 @@ public class SyncPolicySpec extends Abst
return uAltSearchSchemas;
}
- public void setuAltSearchSchemas(final List<String> uAltSearchSchemas) {
- this.uAltSearchSchemas = uAltSearchSchemas;
- }
-
@XmlElementWrapper(name = "roleAltSearchSchemas")
@XmlElement(name = "roleAltSearchSchema")
@JsonProperty("roleAltSearchSchemas")
@@ -90,11 +79,6 @@ public class SyncPolicySpec extends Abst
return rAltSearchSchemas;
}
- public void setrAltSearchSchemas(final List<String> rAltSearchSchemas) {
- this.rAltSearchSchemas = rAltSearchSchemas;
- }
-
-
public String getRoleJavaRule() {
return roleJavaRule;
}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java?rev=1507238&r1=1507237&r2=1507238&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java Fri Jul 26 09:48:07 2013
@@ -56,11 +56,13 @@ public final class AttributableOperation
private static void populate(final Map<String, AttributeTO> updatedAttrs,
final Map<String, AttributeTO> originalAttrs, final AbstractAttributableMod result) {
+
populate(updatedAttrs, originalAttrs, result, false);
}
private static void populate(final Map<String, AttributeTO> updatedAttrs,
- final Map<String, AttributeTO> originalAttrs, final AbstractAttributableMod result, final boolean virtuals) {
+ final Map<String, AttributeTO> originalAttrs, final AbstractAttributableMod result,
+ final boolean virtuals) {
for (Map.Entry<String, AttributeTO> entry : updatedAttrs.entrySet()) {
AttributeMod mod = new AttributeMod();
@@ -76,24 +78,24 @@ public final class AttributableOperation
// avoid unwanted inputs
updatedValues.remove("");
if (!entry.getValue().isReadonly()) {
- mod.setValuesToBeAdded(new ArrayList<String>(updatedValues));
+ mod.getValuesToBeAdded().addAll(updatedValues);
if (!mod.isEmpty()) {
if (virtuals) {
- result.addVirtualAttributeToBeRemoved(mod.getSchema());
+ result.getVirtualAttributesToBeRemoved().add(mod.getSchema());
} else {
- result.addAttributeToBeRemoved(mod.getSchema());
+ result.getAttributesToBeRemoved().add(mod.getSchema());
}
}
}
- mod.setValuesToBeRemoved(new ArrayList<String>(originalValues));
+ mod.getValuesToBeRemoved().addAll(originalValues);
if (!mod.isEmpty()) {
if (virtuals) {
- result.addVirtualAttributeToBeUpdated(mod);
+ result.getVirtualAttributesToBeUpdated().add(mod);
} else {
- result.addAttributeToBeUpdated(mod);
+ result.getAttributesToBeUpdated().add(mod);
}
}
}
@@ -120,7 +122,8 @@ public final class AttributableOperation
originalAttrNames.removeAll(updatedAttrs.keySet());
if (!incremental) {
- result.setAttributesToBeRemoved(originalAttrNames);
+ result.getAttributesToBeRemoved().clear();
+ result.getAttributesToBeRemoved().addAll(originalAttrNames);
}
Set<String> emptyUpdatedAttrs = new HashSet<String>();
@@ -132,7 +135,7 @@ public final class AttributableOperation
}
for (String emptyUpdatedAttr : emptyUpdatedAttrs) {
updatedAttrs.remove(emptyUpdatedAttr);
- result.addAttributeToBeRemoved(emptyUpdatedAttr);
+ result.getAttributesToBeRemoved().add(emptyUpdatedAttr);
}
populate(updatedAttrs, originalAttrs, result);
@@ -145,12 +148,14 @@ public final class AttributableOperation
originalAttrNames.removeAll(updatedAttrs.keySet());
if (!incremental) {
- result.setDerivedAttributesToBeRemoved(originalAttrNames);
+ result.getDerivedAttributesToBeRemoved().clear();
+ result.getDerivedAttributesToBeRemoved().addAll(originalAttrNames);
}
Set<String> updatedAttrNames = new HashSet<String>(updatedAttrs.keySet());
updatedAttrNames.removeAll(originalAttrs.keySet());
- result.setDerivedAttributesToBeAdded(updatedAttrNames);
+ result.getDerivedAttributesToBeAdded().clear();
+ result.getDerivedAttributesToBeAdded().addAll(updatedAttrNames);
// 4. virtual attributes
updatedAttrs = updated.getVirtualAttributeMap();
@@ -160,7 +165,8 @@ public final class AttributableOperation
originalAttrNames.removeAll(updatedAttrs.keySet());
if (!incremental) {
- result.setVirtualAttributesToBeRemoved(originalAttrNames);
+ result.getVirtualAttributesToBeRemoved().clear();
+ result.getVirtualAttributesToBeRemoved().addAll(originalAttrNames);
}
populate(updatedAttrs, originalAttrs, result, true);
@@ -170,12 +176,14 @@ public final class AttributableOperation
Set<String> originalRes = new HashSet<String>(original.getResources());
updatedRes.removeAll(originalRes);
- result.setResourcesToBeAdded(updatedRes);
+ result.getResourcesToBeAdded().clear();
+ result.getResourcesToBeAdded().addAll(updatedRes);
originalRes.removeAll(updated.getResources());
if (!incremental) {
- result.setResourcesToBeRemoved(originalRes);
+ result.getResourcesToBeRemoved().clear();
+ result.getResourcesToBeRemoved().addAll(originalRes);
}
}
@@ -228,33 +236,31 @@ public final class AttributableOperation
AttributeMod attrMod = new AttributeMod();
attrMod.setSchema(attr.getSchema());
- attrMod.setValuesToBeAdded(attr.getValues());
+ attrMod.getValuesToBeAdded().addAll(attr.getValues());
if (!attrMod.isEmpty()) {
- membMod.addAttributeToBeUpdated(attrMod);
- membMod.addAttributeToBeRemoved(attrMod.getSchema());
+ membMod.getAttributesToBeUpdated().add(attrMod);
+ membMod.getAttributesToBeRemoved().add(attrMod.getSchema());
}
}
for (AttributeTO attr : entry.getValue().getDerivedAttributes()) {
-
- membMod.addDerivedAttributeToBeAdded(attr.getSchema());
+ membMod.getDerivedAttributesToBeAdded().add(attr.getSchema());
}
for (AttributeTO attr : entry.getValue().getVirtualAttributes()) {
-
AttributeMod attrMod = new AttributeMod();
attrMod.setSchema(attr.getSchema());
- attrMod.setValuesToBeAdded(attr.getValues());
+ attrMod.getValuesToBeAdded().addAll(attr.getValues());
if (!attrMod.isEmpty()) {
- membMod.addVirtualAttributeToBeUpdated(attrMod);
- membMod.addAttributeToBeRemoved(attrMod.getSchema());
+ membMod.getVirtualAttributesToBeUpdated().add(attrMod);
+ membMod.getAttributesToBeRemoved().add(attrMod.getSchema());
}
}
- membMod.setResourcesToBeAdded(entry.getValue().getResources());
+ membMod.getResourcesToBeAdded().addAll(entry.getValue().getResources());
}
if (!membMod.isEmpty()) {
- result.addMembershipToBeAdded(membMod);
+ result.getMembershipsToBeAdded().add(membMod);
}
}
@@ -262,7 +268,7 @@ public final class AttributableOperation
Set<Long> originalRoles = new HashSet<Long>(originalMembs.keySet());
originalRoles.removeAll(updatedMembs.keySet());
for (Long roleId : originalRoles) {
- result.addMembershipToBeRemoved(originalMembs.get(roleId).getId());
+ result.getMembershipsToBeRemoved().add(originalMembs.get(roleId).getId());
}
}
@@ -314,9 +320,11 @@ public final class AttributableOperation
Set<String> updatedEnts = new HashSet<String>(updated.getEntitlements());
Set<String> originalEnts = new HashSet<String>(original.getEntitlements());
if (updatedEnts.equals(originalEnts)) {
- result.setEntitlements(null);
+ result.setModEntitlements(false);
+ result.getEntitlements().clear();
} else {
- result.setEntitlements(updated.getEntitlements());
+ result.setModEntitlements(true);
+ result.getEntitlements().addAll(updated.getEntitlements());
}
// 5. owner
@@ -341,7 +349,7 @@ public final class AttributableOperation
} else {
AttributeTO attrTO = new AttributeTO();
attrTO.setSchema(attrMod.getSchema());
- attrTO.setValues(attrMod.getValuesToBeAdded());
+ attrTO.getValues().addAll(attrMod.getValuesToBeAdded());
rwattrs.put(attrMod.getSchema(), attrTO);
}
@@ -354,8 +362,8 @@ public final class AttributableOperation
final K mod, final T result) {
// 1. attributes
- result.setAttributes(getUpdateValues(to.getAttributeMap(), mod.getAttributesToBeRemoved(), mod.
- getAttributesToBeUpdated()));
+ result.getAttributes().addAll(getUpdateValues(to.getAttributeMap(),
+ mod.getAttributesToBeRemoved(), mod.getAttributesToBeUpdated()));
// 2. derived attributes
Map<String, AttributeTO> attrs = to.getDerivedAttributeMap();
@@ -368,11 +376,11 @@ public final class AttributableOperation
attrs.put(attrName, attrTO);
}
- result.setDerivedAttributes(new ArrayList<AttributeTO>(attrs.values()));
+ result.getDerivedAttributes().addAll(attrs.values());
// 3. virtual attributes
- result.setVirtualAttributes(getUpdateValues(to.getVirtualAttributeMap(), mod.getVirtualAttributesToBeRemoved(),
- mod.getVirtualAttributesToBeUpdated()));
+ result.getVirtualAttributes().addAll(getUpdateValues(to.getVirtualAttributeMap(),
+ mod.getVirtualAttributesToBeRemoved(), mod.getVirtualAttributesToBeUpdated()));
// 4. resources
result.getResources().removeAll(mod.getResourcesToBeRemoved());
@@ -398,7 +406,7 @@ public final class AttributableOperation
// 3. memberships
Map<Long, MembershipTO> membs = result.getMembershipMap();
for (Long membId : userMod.getMembershipsToBeRemoved()) {
- result.removeMembership(membs.get(membId));
+ result.getMemberships().remove(membs.get(membId));
}
for (MembershipMod membMod : userMod.getMembershipsToBeAdded()) {
MembershipTO membTO = new MembershipTO();