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 2012/03/15 11:17:24 UTC
svn commit: r1300882 [2/22] - in /incubator/syncope/trunk:
build-tools/src/main/java/org/syncope/buildtools/
client/src/main/java/org/syncope/annotation/
client/src/main/java/org/syncope/client/
client/src/main/java/org/syncope/client/http/ client/src/...
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/PropagationTaskTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/PropagationTaskTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/PropagationTaskTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/PropagationTaskTO.java Thu Mar 15 10:17:12 2012
@@ -75,8 +75,7 @@ public class PropagationTaskTO extends T
return propagationOperation;
}
- public void setPropagationOperation(
- PropagationOperation propagationOperation) {
+ public void setPropagationOperation(PropagationOperation propagationOperation) {
this.propagationOperation = propagationOperation;
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ReportTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ReportTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ReportTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ReportTO.java Thu Mar 15 10:17:12 2012
@@ -116,7 +116,9 @@ public class ReportTO extends AbstractBa
}
public Date getLastExec() {
- return lastExec == null ? null : new Date(lastExec.getTime());
+ return lastExec == null
+ ? null
+ : new Date(lastExec.getTime());
}
public void setLastExec(Date lastExec) {
@@ -126,7 +128,9 @@ public class ReportTO extends AbstractBa
}
public Date getNextExec() {
- return nextExec == null ? null : new Date(nextExec.getTime());
+ return nextExec == null
+ ? null
+ : new Date(nextExec.getTime());
}
public void setNextExec(Date nextExec) {
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ResourceTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ResourceTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ResourceTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/ResourceTO.java Thu Mar 15 10:17:12 2012
@@ -213,8 +213,7 @@ public class ResourceTO extends Abstract
return connConfProperties;
}
- public void setConnectorConfigurationProperties(
- final Set<ConnConfProperty> connConfProperties) {
+ public void setConnectorConfigurationProperties(final Set<ConnConfProperty> connConfProperties) {
this.connConfProperties = connConfProperties;
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/RoleTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/RoleTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/RoleTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/RoleTO.java Thu Mar 15 10:17:12 2012
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-@JsonIgnoreProperties({"displayName", "empty"})
+@JsonIgnoreProperties( { "displayName", "empty" })
public class RoleTO extends AbstractAttributableTO {
private static final long serialVersionUID = -7785920258290147542L;
@@ -79,8 +79,7 @@ public class RoleTO extends AbstractAttr
return inheritDerivedAttributes;
}
- public void setInheritDerivedAttributes(
- final boolean inheritDerivedAttributes) {
+ public void setInheritDerivedAttributes(final boolean inheritDerivedAttributes) {
this.inheritDerivedAttributes = inheritDerivedAttributes;
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchedTaskTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchedTaskTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchedTaskTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchedTaskTO.java Thu Mar 15 10:17:12 2012
@@ -49,7 +49,9 @@ public class SchedTaskTO extends TaskTO
}
public Date getLastExec() {
- return lastExec == null ? null : new Date(lastExec.getTime());
+ return lastExec == null
+ ? null
+ : new Date(lastExec.getTime());
}
public void setLastExec(Date lastExec) {
@@ -59,7 +61,9 @@ public class SchedTaskTO extends TaskTO
}
public Date getNextExec() {
- return nextExec == null ? null : new Date(nextExec.getTime());
+ return nextExec == null
+ ? null
+ : new Date(nextExec.getTime());
}
public void setNextExec(Date nextExec) {
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchemaTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchemaTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchemaTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SchemaTO.java Thu Mar 15 10:17:12 2012
@@ -58,7 +58,8 @@ public class SchemaTO extends AbstractBa
public String getMandatoryCondition() {
return StringUtils.isNotBlank(mandatoryCondition)
- ? mandatoryCondition : "false";
+ ? mandatoryCondition
+ : "false";
}
public void setMandatoryCondition(String mandatoryCondition) {
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SyncPolicyTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SyncPolicyTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SyncPolicyTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/SyncPolicyTO.java Thu Mar 15 10:17:12 2012
@@ -34,7 +34,9 @@ public class SyncPolicyTO extends Policy
public SyncPolicyTO(boolean global) {
super();
- this.type = global ? PolicyType.GLOBAL_SYNC : PolicyType.SYNC;
+ this.type = global
+ ? PolicyType.GLOBAL_SYNC
+ : PolicyType.SYNC;
}
public void setSpecification(final SyncPolicySpec specification) {
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/UserTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/UserTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/UserTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/UserTO.java Thu Mar 15 10:17:12 2012
@@ -87,8 +87,7 @@ public class UserTO extends AbstractAttr
@JsonIgnore
public Map<Long, MembershipTO> getMembershipMap() {
- Map<Long, MembershipTO> result = new HashMap<Long, MembershipTO>(
- getMemberships().size());
+ Map<Long, MembershipTO> result = new HashMap<Long, MembershipTO>(getMemberships().size());
for (MembershipTO membership : getMemberships()) {
result.put(membership.getRoleId(), membership);
@@ -115,7 +114,8 @@ public class UserTO extends AbstractAttr
public Date getTokenExpireTime() {
return tokenExpireTime == null
- ? null : new Date(tokenExpireTime.getTime());
+ ? null
+ : new Date(tokenExpireTime.getTime());
}
public void setTokenExpireTime(Date tokenExpireTime) {
@@ -171,8 +171,7 @@ public class UserTO extends AbstractAttr
public void removePropagationTO(final String resource) {
if (resource != null && getPropagationTOs().isEmpty()) {
- final List<PropagationTO> toBeRemoved =
- new ArrayList<PropagationTO>();
+ final List<PropagationTO> toBeRemoved = new ArrayList<PropagationTO>();
for (PropagationTO propagationTO : getPropagationTOs()) {
if (resource.equals(propagationTO.getResourceName())) {
@@ -188,8 +187,7 @@ public class UserTO extends AbstractAttr
return propagationTOs;
}
- public void setPropagationTOs(
- final List<PropagationTO> propagationTOs) {
+ public void setPropagationTOs(final List<PropagationTO> propagationTOs) {
this.propagationTOs.clear();
this.propagationTOs.addAll(propagationTOs);
@@ -197,8 +195,7 @@ public class UserTO extends AbstractAttr
@Override
public String toString() {
- return new ReflectionToStringBuilder(this,
- ToStringStyle.MULTI_LINE_STYLE) {
+ return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) {
@Override
protected boolean accept(Field f) {
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/WorkflowFormTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/WorkflowFormTO.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/WorkflowFormTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/to/WorkflowFormTO.java Thu Mar 15 10:17:12 2012
@@ -103,15 +103,15 @@ public class WorkflowFormTO extends Abst
public boolean addProperty(final WorkflowFormPropertyTO property) {
return properties.contains(property)
- ? true : properties.add(property);
+ ? true
+ : properties.add(property);
}
public boolean removeProperty(final WorkflowFormPropertyTO property) {
return properties.remove(property);
}
- public void setProperties(
- final Collection<WorkflowFormPropertyTO> properties) {
+ public void setProperties(final Collection<WorkflowFormPropertyTO> properties) {
this.properties.clear();
if (properties != null) {
@@ -121,8 +121,7 @@ public class WorkflowFormTO extends Abst
@JsonIgnore
public Map<String, WorkflowFormPropertyTO> getPropertiesAsMap() {
- Map<String, WorkflowFormPropertyTO> props =
- new HashMap<String, WorkflowFormPropertyTO>();
+ Map<String, WorkflowFormPropertyTO> props = new HashMap<String, WorkflowFormPropertyTO>();
for (WorkflowFormPropertyTO prop : getProperties()) {
props.put(prop.getId(), prop);
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/AttributableOperations.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/AttributableOperations.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/AttributableOperations.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/AttributableOperations.java Thu Mar 15 10:17:12 2012
@@ -52,30 +52,22 @@ public final class AttributableOperation
return (T) SerializationUtils.clone(original);
}
- private static void populate(
- final Map<String, AttributeTO> updatedAttrs,
- final Map<String, AttributeTO> originalAttrs,
- final AbstractAttributableMod result) {
+ 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) {
+ private static void populate(final Map<String, AttributeTO> updatedAttrs,
+ final Map<String, AttributeTO> originalAttrs, final AbstractAttributableMod result, final boolean virtuals) {
for (Map.Entry<String, AttributeTO> entry : updatedAttrs.entrySet()) {
AttributeMod mod = new AttributeMod();
mod.setSchema(entry.getKey());
- Set<String> updatedValues = new HashSet<String>(
- entry.getValue().getValues());
+ Set<String> updatedValues = new HashSet<String>(entry.getValue().getValues());
- Set<String> originalValues =
- originalAttrs.containsKey(entry.getKey())
- ? new HashSet<String>(
- originalAttrs.get(entry.getKey()).getValues())
+ Set<String> originalValues = originalAttrs.containsKey(entry.getKey())
+ ? new HashSet<String>(originalAttrs.get(entry.getKey()).getValues())
: Collections.EMPTY_SET;
if (!updatedValues.equals(originalValues)) {
@@ -86,16 +78,14 @@ public final class AttributableOperation
if (!mod.isEmpty()) {
if (virtuals) {
- result.addVirtualAttributeToBeRemoved(
- mod.getSchema());
+ result.addVirtualAttributeToBeRemoved(mod.getSchema());
} else {
result.addAttributeToBeRemoved(mod.getSchema());
}
}
}
- mod.setValuesToBeRemoved(
- new ArrayList<String>(originalValues));
+ mod.setValuesToBeRemoved(new ArrayList<String>(originalValues));
if (!mod.isEmpty()) {
if (virtuals) {
@@ -108,15 +98,12 @@ public final class AttributableOperation
}
}
- private static void diff(
- final AbstractAttributableTO updated,
- final AbstractAttributableTO original,
+ private static void diff(final AbstractAttributableTO updated, final AbstractAttributableTO original,
final AbstractAttributableMod result) {
// 1. check same id
if (updated.getId() != original.getId()) {
- throw new IllegalArgumentException(
- "AttributableTO's id must be the same");
+ throw new IllegalArgumentException("AttributableTO's id must be the same");
}
result.setId(updated.getId());
@@ -124,15 +111,13 @@ public final class AttributableOperation
Map<String, AttributeTO> updatedAttrs = updated.getAttributeMap();
Map<String, AttributeTO> originalAttrs = original.getAttributeMap();
- Set<String> originalAttrNames =
- new HashSet<String>(originalAttrs.keySet());
+ Set<String> originalAttrNames = new HashSet<String>(originalAttrs.keySet());
originalAttrNames.removeAll(updatedAttrs.keySet());
result.setAttributesToBeRemoved(originalAttrNames);
Set<String> emptyUpdatedAttrs = new HashSet<String>();
for (Map.Entry<String, AttributeTO> entry : updatedAttrs.entrySet()) {
- if (entry.getValue().getValues() == null
- || entry.getValue().getValues().isEmpty()) {
+ if (entry.getValue().getValues() == null || entry.getValue().getValues().isEmpty()) {
emptyUpdatedAttrs.add(entry.getKey());
}
@@ -189,15 +174,13 @@ public final class AttributableOperation
diff(updated, original, result);
// 1. password
- if (original.getPassword() != null
- && !original.getPassword().equals(updated.getPassword())) {
+ if (original.getPassword() != null && !original.getPassword().equals(updated.getPassword())) {
result.setPassword(updated.getPassword());
}
// 2. username
- if (original.getUsername() != null
- && !original.getUsername().equals(updated.getUsername())) {
+ if (original.getUsername() != null && !original.getUsername().equals(updated.getUsername())) {
result.setUsername(updated.getUsername());
}
@@ -211,11 +194,9 @@ public final class AttributableOperation
membMod.setRole(entry.getValue().getRoleId());
if (originalMembs.containsKey(entry.getKey())) {
- diff(entry.getValue(), originalMembs.get(entry.getKey()),
- membMod);
+ diff(entry.getValue(), originalMembs.get(entry.getKey()), membMod);
} else {
- for (AttributeTO attr :
- entry.getValue().getAttributes()) {
+ for (AttributeTO attr : entry.getValue().getAttributes()) {
AttributeMod attrMod = new AttributeMod();
attrMod.setSchema(attr.getSchema());
@@ -226,13 +207,11 @@ public final class AttributableOperation
membMod.addAttributeToBeRemoved(attrMod.getSchema());
}
}
- for (AttributeTO attr :
- entry.getValue().getDerivedAttributes()) {
+ for (AttributeTO attr : entry.getValue().getDerivedAttributes()) {
membMod.addDerivedAttributeToBeAdded(attr.getSchema());
}
- for (AttributeTO attr :
- entry.getValue().getVirtualAttributes()) {
+ for (AttributeTO attr : entry.getValue().getVirtualAttributes()) {
AttributeMod attrMod = new AttributeMod();
attrMod.setSchema(attr.getSchema());
@@ -275,10 +254,8 @@ public final class AttributableOperation
result.setInheritAccountPolicy(updated.isInheritAccountPolicy());
result.setInheritPasswordPolicy(updated.isInheritPasswordPolicy());
result.setInheritAttributes(updated.isInheritAttributes());
- result.setInheritDerivedAttributes(
- updated.isInheritDerivedAttributes());
- result.setInheritVirtualAttributes(
- updated.isInheritVirtualAttributes());
+ result.setInheritDerivedAttributes(updated.isInheritDerivedAttributes());
+ result.setInheritVirtualAttributes(updated.isInheritVirtualAttributes());
// 2. policies
ReferenceMod refAccountPolicy = new ReferenceMod();
@@ -295,10 +272,8 @@ public final class AttributableOperation
}
// 4. entitlements
- Set<String> updatedEnts = new HashSet<String>(
- updated.getEntitlements());
- Set<String> originalEnts = new HashSet<String>(
- original.getEntitlements());
+ Set<String> updatedEnts = new HashSet<String>(updated.getEntitlements());
+ Set<String> originalEnts = new HashSet<String>(original.getEntitlements());
if (!updatedEnts.equals(originalEnts)) {
result.setEntitlements(updated.getEntitlements());
}
@@ -306,10 +281,8 @@ public final class AttributableOperation
return result;
}
- private static List<AttributeTO> getUpdateValues(
- final Map<String, AttributeTO> attrs,
- final Set<String> attrsToBeRemoved,
- final Set<AttributeMod> attrsToBeUpdated) {
+ private static List<AttributeTO> getUpdateValues(final Map<String, AttributeTO> attrs,
+ final Set<String> attrsToBeRemoved, final Set<AttributeMod> attrsToBeUpdated) {
for (String attrName : attrsToBeRemoved) {
attrs.remove(attrName);
@@ -331,19 +304,17 @@ public final class AttributableOperation
return new ArrayList(attrs.values());
}
- private static <T extends AbstractAttributableTO, K extends AbstractAttributableMod> void apply(
- final T to, final K mod, final T result) {
+ private static <T extends AbstractAttributableTO, K extends AbstractAttributableMod> void apply(final T to,
+ final K mod, final T result) {
// 1. check same id
if (to.getId() != mod.getId()) {
- throw new IllegalArgumentException(
- "AttributableTO and AttributableMod ids must be the same");
+ throw new IllegalArgumentException("AttributableTO and AttributableMod ids must be the same");
}
// 2. attributes
- result.setAttributes(getUpdateValues(to.getAttributeMap(),
- mod.getAttributesToBeRemoved(),
- mod.getAttributesToBeUpdated()));
+ result.setAttributes(getUpdateValues(to.getAttributeMap(), mod.getAttributesToBeRemoved(), mod
+ .getAttributesToBeUpdated()));
// 3. derived attributes
Map<String, AttributeTO> attrs = to.getDerivedAttributeMap();
@@ -359,9 +330,7 @@ public final class AttributableOperation
result.setDerivedAttributes(new ArrayList(attrs.values()));
// 4. virtual attributes
- result.setVirtualAttributes(
- getUpdateValues(to.getVirtualAttributeMap(),
- mod.getVirtualAttributesToBeRemoved(),
+ result.setVirtualAttributes(getUpdateValues(to.getVirtualAttributeMap(), mod.getVirtualAttributesToBeRemoved(),
mod.getVirtualAttributesToBeUpdated()));
// 5. resources
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/ConnConfPropUtils.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/ConnConfPropUtils.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/ConnConfPropUtils.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/ConnConfPropUtils.java Thu Mar 15 10:17:12 2012
@@ -34,21 +34,17 @@ public final class ConnConfPropUtils {
private ConnConfPropUtils() {
}
- public static Set<ConnConfProperty> joinConnInstanceProperties(
- final Map<String, ConnConfProperty> connectorProp,
+ public static Set<ConnConfProperty> joinConnInstanceProperties(final Map<String, ConnConfProperty> connectorProp,
final Map<String, ConnConfProperty> resourceProp) {
connectorProp.putAll(resourceProp);
return new HashSet<ConnConfProperty>(connectorProp.values());
}
- public static Map<String, ConnConfProperty> getConnConfPropertyMap(
- final Set<ConnConfProperty> properties) {
+ public static Map<String, ConnConfProperty> getConnConfPropertyMap(final Set<ConnConfProperty> properties) {
- final Map<String, ConnConfProperty> prop =
- new HashMap<String, ConnConfProperty>();
- for (Iterator<ConnConfProperty> item =
- properties.iterator(); item.hasNext();) {
+ final Map<String, ConnConfProperty> prop = new HashMap<String, ConnConfProperty>();
+ for (Iterator<ConnConfProperty> item = properties.iterator(); item.hasNext();) {
ConnConfProperty property = item.next();
prop.put(property.getSchema().getName(), property);
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/XMLSerializer.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/XMLSerializer.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/XMLSerializer.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/util/XMLSerializer.java Thu Mar 15 10:17:12 2012
@@ -32,16 +32,14 @@ import org.slf4j.LoggerFactory;
*/
public class XMLSerializer {
- private static final Logger LOG =
- LoggerFactory.getLogger(XMLSerializer.class);
+ private static final Logger LOG = LoggerFactory.getLogger(XMLSerializer.class);
public static String serialize(final Object object) {
String result = null;
XStream xstream = new XStream();
try {
- result = URLEncoder.encode(
- xstream.toXML(object), "UTF-8");
+ result = URLEncoder.encode(xstream.toXML(object), "UTF-8");
} catch (UnsupportedEncodingException e) {
LOG.error("During serialization", e);
}
@@ -49,15 +47,13 @@ public class XMLSerializer {
return result;
}
- public static <T extends Object> T deserialize(
- final String serialized) {
+ public static <T extends Object> T deserialize(final String serialized) {
T result = null;
XStream xstream = new XStream();
try {
- result = (T) xstream.fromXML(
- URLDecoder.decode(serialized, "UTF-8"));
+ result = (T) xstream.fromXML(URLDecoder.decode(serialized, "UTF-8"));
} catch (UnsupportedEncodingException e) {
LOG.error("During deserialization", e);
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientCompositeErrorException.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientCompositeErrorException.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientCompositeErrorException.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientCompositeErrorException.java Thu Mar 15 10:17:12 2012
@@ -25,8 +25,7 @@ import org.springframework.http.HttpStat
import org.springframework.web.client.HttpClientErrorException;
import org.syncope.types.SyncopeClientExceptionType;
-public class SyncopeClientCompositeErrorException
- extends HttpClientErrorException {
+public class SyncopeClientCompositeErrorException extends HttpClientErrorException {
private Set<SyncopeClientException> exceptions;
@@ -43,13 +42,11 @@ public class SyncopeClientCompositeError
return getException(exceptionType) != null;
}
- public SyncopeClientException getException(
- SyncopeClientExceptionType exceptionType) {
+ public SyncopeClientException getException(SyncopeClientExceptionType exceptionType) {
boolean found = false;
SyncopeClientException syncopeClientException = null;
- for (Iterator<SyncopeClientException> itor = exceptions.iterator();
- itor.hasNext() && !found;) {
+ for (Iterator<SyncopeClientException> itor = exceptions.iterator(); itor.hasNext() && !found;) {
syncopeClientException = itor.next();
if (syncopeClientException.getType().equals(exceptionType)) {
@@ -57,7 +54,9 @@ public class SyncopeClientCompositeError
}
}
- return found ? syncopeClientException : null;
+ return found
+ ? syncopeClientException
+ : null;
}
public Set<SyncopeClientException> getExceptions() {
@@ -66,8 +65,7 @@ public class SyncopeClientCompositeError
public boolean addException(SyncopeClientException exception) {
if (exception.getType() == null) {
- throw new IllegalArgumentException(exception
- + " does not have the right "
+ throw new IllegalArgumentException(exception + " does not have the right "
+ SyncopeClientExceptionType.class.getName() + " set");
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientErrorHandler.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientErrorHandler.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientErrorHandler.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/client/validation/SyncopeClientErrorHandler.java Thu Mar 15 10:17:12 2012
@@ -37,56 +37,44 @@ public class SyncopeClientErrorHandler e
/**
* Logger.
*/
- private static final Logger LOG = LoggerFactory.getLogger(
- SyncopeClientErrorHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SyncopeClientErrorHandler.class);
- public static final HttpStatus[] MANAGED_STATUSES = new HttpStatus[]{
- HttpStatus.BAD_REQUEST, HttpStatus.NOT_FOUND};
+ public static final HttpStatus[] MANAGED_STATUSES = new HttpStatus[] { HttpStatus.BAD_REQUEST, HttpStatus.NOT_FOUND };
@Override
- public void handleError(final ClientHttpResponse response)
- throws IOException {
+ public void handleError(final ClientHttpResponse response) throws IOException {
if (!ArrayUtils.contains(MANAGED_STATUSES, response.getStatusCode())) {
super.handleError(response);
}
- List<String> exceptionTypesInHeaders = response.getHeaders().get(
- EXCEPTION_TYPE_HEADER);
+ List<String> exceptionTypesInHeaders = response.getHeaders().get(EXCEPTION_TYPE_HEADER);
if (exceptionTypesInHeaders == null) {
LOG.debug("No " + EXCEPTION_TYPE_HEADER + " provided");
return;
}
- SyncopeClientCompositeErrorException compositeException =
- new SyncopeClientCompositeErrorException(
- response.getStatusCode());
+ SyncopeClientCompositeErrorException compositeException = new SyncopeClientCompositeErrorException(response
+ .getStatusCode());
Set<String> handledExceptions = new HashSet<String>();
for (String exceptionTypeAsString : exceptionTypesInHeaders) {
SyncopeClientExceptionType exceptionType = null;
try {
- exceptionType = SyncopeClientExceptionType.getFromHeaderValue(
- exceptionTypeAsString);
+ exceptionType = SyncopeClientExceptionType.getFromHeaderValue(exceptionTypeAsString);
} catch (IllegalArgumentException e) {
- LOG.error("Unexpected value of "
- + EXCEPTION_TYPE_HEADER + ": " + exceptionTypeAsString,
- e);
+ LOG.error("Unexpected value of " + EXCEPTION_TYPE_HEADER + ": " + exceptionTypeAsString, e);
}
if (exceptionType != null) {
handledExceptions.add(exceptionTypeAsString);
- SyncopeClientException clientException =
- new SyncopeClientException();
+ SyncopeClientException clientException = new SyncopeClientException();
clientException.setType(exceptionType);
- if (response.getHeaders().get(
- exceptionType.getElementHeaderName()) != null
- && !response.getHeaders().get(
- exceptionType.getElementHeaderName()).isEmpty()) {
+ if (response.getHeaders().get(exceptionType.getElementHeaderName()) != null
+ && !response.getHeaders().get(exceptionType.getElementHeaderName()).isEmpty()) {
- clientException.setElements(response.getHeaders().get(
- exceptionType.getElementHeaderName()));
+ clientException.setElements(response.getHeaders().get(exceptionType.getElementHeaderName()));
}
compositeException.addException(clientException);
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/AuditElements.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/AuditElements.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/AuditElements.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/AuditElements.java Thu Mar 15 10:17:12 2012
@@ -63,12 +63,10 @@ public class AuditElements {
result = EnumSet.allOf(ConnectorSubCategory.class);
break;
-
case logger:
result = EnumSet.allOf(LoggerSubCategory.class);
break;
-
default:
result = null;
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfPropSchema.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfPropSchema.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfPropSchema.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfPropSchema.java Thu Mar 15 10:17:12 2012
@@ -20,8 +20,7 @@ package org.syncope.types;
import org.syncope.client.AbstractBaseBean;
-public class ConnConfPropSchema extends AbstractBaseBean
- implements Comparable<ConnConfPropSchema> {
+public class ConnConfPropSchema extends AbstractBaseBean implements Comparable<ConnConfPropSchema> {
private static final long serialVersionUID = -1976365781005801296L;
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfProperty.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfProperty.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfProperty.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/ConnConfProperty.java Thu Mar 15 10:17:12 2012
@@ -22,8 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import org.syncope.client.AbstractBaseBean;
-public class ConnConfProperty extends AbstractBaseBean
- implements Comparable<ConnConfProperty> {
+public class ConnConfProperty extends AbstractBaseBean implements Comparable<ConnConfProperty> {
private static final long serialVersionUID = -8391413960221862238L;
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/EntityViolationType.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/EntityViolationType.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/EntityViolationType.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/EntityViolationType.java Thu Mar 15 10:17:12 2012
@@ -21,60 +21,34 @@ package org.syncope.types;
public enum EntityViolationType {
Standard(""),
- MultivalueAndUniqueConstraint(
- "org.syncope.core.validation.schema.multivalueAndUniqueConstraint"),
- InvalidAccountIdCount(
- "org.syncope.core.validation.externalresource.invalidAccountIdCount"),
- MoreThanOneNonNull(
- "org.syncope.core.validation.attrvalue.moreThanOneNonNull"),
- InvalidUSchema(
- "org.syncope.core.validation.attrvalue.invalidUSchema"),
- InvalidUDerSchema(
- "org.syncope.core.validation.attrvalue.invalidUDerSchema"),
- InvalidUVirSchema(
- "org.syncope.core.validation.attrvalue.invalidUVirSchema"),
- InvalidRSchema(
- "org.syncope.core.validation.attrvalue.invalidRSchema"),
- InvalidRDerSchema(
- "org.syncope.core.validation.attrvalue.invalidRDerSchema"),
- InvalidRVirSchema(
- "org.syncope.core.validation.attrvalue.invalidRVirSchema"),
- InvalidMSchema(
- "org.syncope.core.validation.attrvalue.invalidMSchema"),
- InvalidMDerSchema(
- "org.syncope.core.validation.attrvalue.invalidMDerSchema"),
- InvalidMVirSchema(
- "org.syncope.core.validation.attrvalue.invalidMVirSchema"),
- InvalidSchemaTypeSpecification(
- "org.syncope.core.validation.attrvalue.invalidSchemaTypeSpecification"),
- InvalidValueList(
- "org.syncope.core.validation.attr.invalidValueList"),
- InvalidEntitlementName(
- "org.syncope.core.validation.entitlement.invalidName"),
- InvalidPropagationTask(
- "org.syncope.core.validation.propagationtask.invalid"),
- InvalidSchedTask(
- "org.syncope.core.validation.schedtask.invalid"),
- InvalidSyncTask(
- "org.syncope.core.validation.synctask.invalid"),
- InvalidPassword(
- "org.syncope.core.validation.password.invalid"),
- InvalidUsername(
- "org.syncope.core.validation.username.invalid"),
+ MultivalueAndUniqueConstraint("org.syncope.core.validation.schema.multivalueAndUniqueConstraint"),
+ InvalidAccountIdCount("org.syncope.core.validation.externalresource.invalidAccountIdCount"),
+ MoreThanOneNonNull("org.syncope.core.validation.attrvalue.moreThanOneNonNull"),
+ InvalidUSchema("org.syncope.core.validation.attrvalue.invalidUSchema"),
+ InvalidUDerSchema("org.syncope.core.validation.attrvalue.invalidUDerSchema"),
+ InvalidUVirSchema("org.syncope.core.validation.attrvalue.invalidUVirSchema"),
+ InvalidRSchema("org.syncope.core.validation.attrvalue.invalidRSchema"),
+ InvalidRDerSchema("org.syncope.core.validation.attrvalue.invalidRDerSchema"),
+ InvalidRVirSchema("org.syncope.core.validation.attrvalue.invalidRVirSchema"),
+ InvalidMSchema("org.syncope.core.validation.attrvalue.invalidMSchema"),
+ InvalidMDerSchema("org.syncope.core.validation.attrvalue.invalidMDerSchema"),
+ InvalidMVirSchema("org.syncope.core.validation.attrvalue.invalidMVirSchema"),
+ InvalidSchemaTypeSpecification("org.syncope.core.validation.attrvalue.invalidSchemaTypeSpecification"),
+ InvalidValueList("org.syncope.core.validation.attr.invalidValueList"),
+ InvalidEntitlementName("org.syncope.core.validation.entitlement.invalidName"),
+ InvalidPropagationTask("org.syncope.core.validation.propagationtask.invalid"),
+ InvalidSchedTask("org.syncope.core.validation.schedtask.invalid"),
+ InvalidSyncTask("org.syncope.core.validation.synctask.invalid"),
+ InvalidPassword("org.syncope.core.validation.password.invalid"),
+ InvalidUsername("org.syncope.core.validation.username.invalid"),
InvalidPolicy(// not throwable using rest interface because the TO is typed
- "org.syncope.core.validation.policy.invalid"),
- InvalidPasswordPolicy(
- "org.syncope.core.validation.policy.invalid"),
- InvalidAccountPolicy(
- "org.syncope.core.validation.policy.invalid"),
- InvalidSyncPolicy(
- "org.syncope.core.validation.policy.invalid"),
- InvalidNotification(
- "org.syncope.core.validation.notification.invalid"),
- InvalidReport(
- "org.syncope.core.validation.report.invalid"),
- InvalidSchemaMapping(
- "org.syncope.core.validation.mapping.invalid");
+ "org.syncope.core.validation.policy.invalid"),
+ InvalidPasswordPolicy("org.syncope.core.validation.policy.invalid"),
+ InvalidAccountPolicy("org.syncope.core.validation.policy.invalid"),
+ InvalidSyncPolicy("org.syncope.core.validation.policy.invalid"),
+ InvalidNotification("org.syncope.core.validation.notification.invalid"),
+ InvalidReport("org.syncope.core.validation.report.invalid"),
+ InvalidSchemaMapping("org.syncope.core.validation.mapping.invalid");
private String message;
@@ -88,6 +62,8 @@ public enum EntityViolationType {
@Override
public String toString() {
- return this == Standard ? message : super.toString();
+ return this == Standard
+ ? message
+ : super.toString();
}
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/PropagationOperation.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/PropagationOperation.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/PropagationOperation.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/PropagationOperation.java Thu Mar 15 10:17:12 2012
@@ -20,5 +20,7 @@ package org.syncope.types;
public enum PropagationOperation {
- CREATE, UPDATE, DELETE
+ CREATE,
+ UPDATE,
+ DELETE
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/SchemaType.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/SchemaType.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/SchemaType.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/SchemaType.java Thu Mar 15 10:17:12 2012
@@ -38,8 +38,6 @@ public enum SchemaType {
}
public boolean isConversionPatternNeeded() {
- return this == SchemaType.Date
- || this == SchemaType.Double
- || this == SchemaType.Long;
+ return this == SchemaType.Date || this == SchemaType.Double || this == SchemaType.Long;
}
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncPolicySpec.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncPolicySpec.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncPolicySpec.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncPolicySpec.java Thu Mar 15 10:17:12 2012
@@ -45,8 +45,7 @@ public class SyncPolicySpec extends Abst
}
}
- public void setConflictResolutionAction(
- final ConflictResolutionAction conflictResolutionAction) {
+ public void setConflictResolutionAction(final ConflictResolutionAction conflictResolutionAction) {
this.conflictResolutionAction = conflictResolutionAction;
}
@@ -57,8 +56,7 @@ public class SyncPolicySpec extends Abst
return alternativeSearchAttrs;
}
- public void setAlternativeSearchAttrs(
- final List<String> alternativeSearchAttrs) {
+ public void setAlternativeSearchAttrs(final List<String> alternativeSearchAttrs) {
this.alternativeSearchAttrs = alternativeSearchAttrs;
}
}
Modified: incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncopeClientExceptionType.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncopeClientExceptionType.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncopeClientExceptionType.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/syncope/types/SyncopeClientExceptionType.java Thu Mar 15 10:17:12 2012
@@ -20,152 +20,70 @@ package org.syncope.types;
public enum SyncopeClientExceptionType {
- Deadlock(
- "Syncope.Deadlock",
- ""),
- DataIntegrityViolation(
- "Syncope.DataIntegrityViolation",
- "Syncope.DataIntegrityViolation.name"),
- ExistingResource(
- "Syncope.ExistingResource",
- "Syncope.ExistingResource.name"),
- GenericPersistence(
- "Syncope.GenericPersistence",
- "Syncope.GenericPersistence.cause"),
- InvalidLogger(
- "Syncope.InvalidLogger",
- "Syncope.InvalidLogger.message"),
- InvalidConnInstance(
- "Syncope.InvalidConnInstance",
- "Syncope.InvalidConnInstance.message"),
- InvalidPasswordPolicy(
- "Syncope.InvalidPasswordPolicy",
- "Syncope.InvalidPasswordPolicy.reason"),
- InvalidAccountPolicy(
- "Syncope.InvalidAccountPolicy",
- "Syncope.InvalidAccountPolicy.reason"),
- InvalidSyncPolicy(
- "Syncope.InvalidSyncPolicy",
- "Syncope.InvalidSyncPolicy.reason"),
- InvalidSyncopeRole(
- "Syncope.InvalidSyncopeRole",
- "Syncope.InvalidSyncopeRole.reason"),
- InvalidReportExec(
- "Syncope.InvalidReportExec",
- "Syncope.InvalidReportExec.reason"),
- InvalidRoles(
- "Syncope.InvalidRoles",
- "Syncope.InvalidRoles.name"),
- InvalidSchemaDefinition(
- "Syncope.InvalidSchemaDefinition",
- ""),
- InvalidSearchCondition(
- "Syncope.InvalidSearchCondition",
- ""),
+ Deadlock("Syncope.Deadlock", ""),
+ DataIntegrityViolation("Syncope.DataIntegrityViolation", "Syncope.DataIntegrityViolation.name"),
+ ExistingResource("Syncope.ExistingResource", "Syncope.ExistingResource.name"),
+ GenericPersistence("Syncope.GenericPersistence", "Syncope.GenericPersistence.cause"),
+ InvalidLogger("Syncope.InvalidLogger", "Syncope.InvalidLogger.message"),
+ InvalidConnInstance("Syncope.InvalidConnInstance", "Syncope.InvalidConnInstance.message"),
+ InvalidPasswordPolicy("Syncope.InvalidPasswordPolicy", "Syncope.InvalidPasswordPolicy.reason"),
+ InvalidAccountPolicy("Syncope.InvalidAccountPolicy", "Syncope.InvalidAccountPolicy.reason"),
+ InvalidSyncPolicy("Syncope.InvalidSyncPolicy", "Syncope.InvalidSyncPolicy.reason"),
+ InvalidSyncopeRole("Syncope.InvalidSyncopeRole", "Syncope.InvalidSyncopeRole.reason"),
+ InvalidReportExec("Syncope.InvalidReportExec", "Syncope.InvalidReportExec.reason"),
+ InvalidRoles("Syncope.InvalidRoles", "Syncope.InvalidRoles.name"),
+ InvalidSchemaDefinition("Syncope.InvalidSchemaDefinition", ""),
+ InvalidSearchCondition("Syncope.InvalidSearchCondition", ""),
InvalidPropagationTaskExecReport(
- "Syncope.InvalidPropagationTaskExecReport",
- "Syncope.InvalidPropagationTaskExecReport.element"),
- InvalidUSchema(
- "Syncope.InvalidUSchemaUpdate",
- "Syncope.InvalidUSchemaUpdate.name"),
- InvalidUDerSchema(
- "Syncope.InvalidUDerSchemaUpdate",
- "Syncope.InvalidUDerSchemaUpdate.name"),
- InvalidUVirSchema(
- "Syncope.InvalidUVirSchemaUpdate",
- "Syncope.InvalidUVirSchemaUpdate.name"),
- InvalidRSchema(
- "Syncope.InvalidRSchemaUpdate",
- "Syncope.InvalidRSchemaUpdate.name"),
- InvalidRDerSchema(
- "Syncope.InvalidRDerSchemaUpdate",
- "Syncope.InvalidRDerSchemaUpdate.name"),
- InvalidRVirSchema(
- "Syncope.InvalidRVirSchemaUpdate",
- "Syncope.InvalidRVirSchemaUpdate.name"),
- InvalidMSchema(
- "Syncope.InvalidMSchemaUpdate",
- "Syncope.InvalidMSchemaUpdate.name"),
- InvalidMDerSchema(
- "Syncope.InvalidMDerSchemaUpdate",
- "Syncope.InvalidMDerSchemaUpdate.name"),
- InvalidMVirSchema(
- "Syncope.InvalidMVirSchemaUpdate",
- "Syncope.InvalidMVirSchemaUpdate.name"),
- InvalidSchemaMapping(
- "Syncope.InvalidSchemaMapping",
- ""),
- InvalidSyncopeUser(
- "Syncope.InvalidSyncopeUser",
- "Syncope.InvalidSyncopeUser.element"),
- InvalidExternalResource(
- "Syncope.InvalidExternalResource",
- "Syncope.InvalidExternalResource.element"),
- InvalidNotification(
- "Syncope.InvalidNotification",
- "Syncope.InvalidNotification.element"),
- InvalidPropagationTask(
- "Syncope.InvalidPropagationTask",
- "Syncope.InvalidPropagationTask.element"),
- InvalidSchedTask(
- "Syncope.InvalidSchedTask",
- "Syncope.InvalidSchedTask.element"),
- InvalidSyncTask(
- "Syncope.InvalidSyncTask",
- "Syncope.InvalidSyncTask.element"),
- InvalidValues(
- "Syncope.InvalidValues",
- "Syncope.InvalidValues.attributeName"),
- NotFound(
- "Syncope.NotFound",
- "Syncope.NotFound.entity"),
- Propagation(
- "Syncope.Propagation",
- "Syncope.Propagation.resourceName"),
- RejectedUserCreate(
- "Syncope.RejectUserCreate",
- "Syncope.RejectUserCreate.syncopeUserId"),
- RequiredValuesMissing(
- "Syncope.RequiredValuesMissing",
- "Syncope.RequiredValuesMissing.attributeName"),
- Scheduling(
- "Syncope.Scheduling",
- "Syncope.Scheduling.message"),
- UnauthorizedRole(
- "Syncope.UnauthorizedRole",
- "Syncope.UnauthorizedRole.id"),
- Unknown(
- "Syncope.Unknown",
- ""),
- Workflow(
- "Syncope.Workflow",
- "Syncope.Workflow.message");
+ "Syncope.InvalidPropagationTaskExecReport",
+ "Syncope.InvalidPropagationTaskExecReport.element"),
+ InvalidUSchema("Syncope.InvalidUSchemaUpdate", "Syncope.InvalidUSchemaUpdate.name"),
+ InvalidUDerSchema("Syncope.InvalidUDerSchemaUpdate", "Syncope.InvalidUDerSchemaUpdate.name"),
+ InvalidUVirSchema("Syncope.InvalidUVirSchemaUpdate", "Syncope.InvalidUVirSchemaUpdate.name"),
+ InvalidRSchema("Syncope.InvalidRSchemaUpdate", "Syncope.InvalidRSchemaUpdate.name"),
+ InvalidRDerSchema("Syncope.InvalidRDerSchemaUpdate", "Syncope.InvalidRDerSchemaUpdate.name"),
+ InvalidRVirSchema("Syncope.InvalidRVirSchemaUpdate", "Syncope.InvalidRVirSchemaUpdate.name"),
+ InvalidMSchema("Syncope.InvalidMSchemaUpdate", "Syncope.InvalidMSchemaUpdate.name"),
+ InvalidMDerSchema("Syncope.InvalidMDerSchemaUpdate", "Syncope.InvalidMDerSchemaUpdate.name"),
+ InvalidMVirSchema("Syncope.InvalidMVirSchemaUpdate", "Syncope.InvalidMVirSchemaUpdate.name"),
+ InvalidSchemaMapping("Syncope.InvalidSchemaMapping", ""),
+ InvalidSyncopeUser("Syncope.InvalidSyncopeUser", "Syncope.InvalidSyncopeUser.element"),
+ InvalidExternalResource("Syncope.InvalidExternalResource", "Syncope.InvalidExternalResource.element"),
+ InvalidNotification("Syncope.InvalidNotification", "Syncope.InvalidNotification.element"),
+ InvalidPropagationTask("Syncope.InvalidPropagationTask", "Syncope.InvalidPropagationTask.element"),
+ InvalidSchedTask("Syncope.InvalidSchedTask", "Syncope.InvalidSchedTask.element"),
+ InvalidSyncTask("Syncope.InvalidSyncTask", "Syncope.InvalidSyncTask.element"),
+ InvalidValues("Syncope.InvalidValues", "Syncope.InvalidValues.attributeName"),
+ NotFound("Syncope.NotFound", "Syncope.NotFound.entity"),
+ Propagation("Syncope.Propagation", "Syncope.Propagation.resourceName"),
+ RejectedUserCreate("Syncope.RejectUserCreate", "Syncope.RejectUserCreate.syncopeUserId"),
+ RequiredValuesMissing("Syncope.RequiredValuesMissing", "Syncope.RequiredValuesMissing.attributeName"),
+ Scheduling("Syncope.Scheduling", "Syncope.Scheduling.message"),
+ UnauthorizedRole("Syncope.UnauthorizedRole", "Syncope.UnauthorizedRole.id"),
+ Unknown("Syncope.Unknown", ""),
+ Workflow("Syncope.Workflow", "Syncope.Workflow.message");
private String headerValue;
private String elementHeaderName;
- private SyncopeClientExceptionType(String headerValue,
- String elementHeaderName) {
+ private SyncopeClientExceptionType(String headerValue, String elementHeaderName) {
this.headerValue = headerValue;
this.elementHeaderName = elementHeaderName;
}
- public static SyncopeClientExceptionType getFromHeaderValue(
- String exceptionTypeHeaderValue) {
+ public static SyncopeClientExceptionType getFromHeaderValue(String exceptionTypeHeaderValue) {
SyncopeClientExceptionType result = null;
for (SyncopeClientExceptionType syncopeClientExceptionType : values()) {
- if (exceptionTypeHeaderValue.equals(
- syncopeClientExceptionType.getHeaderValue())) {
+ if (exceptionTypeHeaderValue.equals(syncopeClientExceptionType.getHeaderValue())) {
result = syncopeClientExceptionType;
}
}
if (result == null) {
- throw new IllegalArgumentException("Unexpected header value: "
- + exceptionTypeHeaderValue);
+ throw new IllegalArgumentException("Unexpected header value: " + exceptionTypeHeaderValue);
}
return result;
Modified: incubator/syncope/trunk/client/src/test/java/org/syncope/client/test/JSONTest.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/test/java/org/syncope/client/test/JSONTest.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/test/java/org/syncope/client/test/JSONTest.java (original)
+++ incubator/syncope/trunk/client/src/test/java/org/syncope/client/test/JSONTest.java Thu Mar 15 10:17:12 2012
@@ -38,20 +38,17 @@ import org.syncope.client.to.WorkflowFor
public class JSONTest {
@Test
- public void testSearchCondition()
- throws IOException {
+ public void testSearchCondition() throws IOException {
- final AttributeCond usernameCond =
- new AttributeCond(AttributeCond.Type.LIKE);
+ final AttributeCond usernameCond = new AttributeCond(AttributeCond.Type.LIKE);
usernameCond.setSchema("username");
usernameCond.setExpression("%o%");
final MembershipCond membershipCond = new MembershipCond();
membershipCond.setRoleName("root");
- final NodeCond searchCondition = NodeCond.getAndCond(
- NodeCond.getLeafCond(usernameCond),
- NodeCond.getLeafCond(membershipCond));
+ final NodeCond searchCondition = NodeCond.getAndCond(NodeCond.getLeafCond(usernameCond), NodeCond
+ .getLeafCond(membershipCond));
assertTrue(searchCondition.checkValidity());
@@ -65,8 +62,7 @@ public class JSONTest {
}
@Test
- public void testLists()
- throws IOException {
+ public void testLists() throws IOException {
List<SchemaTO> schemas = new ArrayList<SchemaTO>();
SchemaTO schemaTO = new SchemaTO();
@@ -81,16 +77,14 @@ public class JSONTest {
StringWriter writer = new StringWriter();
mapper.writeValue(writer, schemas);
- List<SchemaTO> unserializedSchemas = Arrays.asList(
- mapper.readValue(writer.toString(), SchemaTO[].class));
+ List<SchemaTO> unserializedSchemas = Arrays.asList(mapper.readValue(writer.toString(), SchemaTO[].class));
for (SchemaTO unserializedSchema : unserializedSchemas) {
assertNotNull(unserializedSchema);
}
}
@Test
- public void testMap()
- throws IOException {
+ public void testMap() throws IOException {
WorkflowFormPropertyTO prop = new WorkflowFormPropertyTO();
prop.putEnumValue("key1", "value1");
@@ -101,14 +95,12 @@ public class JSONTest {
StringWriter writer = new StringWriter();
mapper.writeValue(writer, prop);
- WorkflowFormPropertyTO unserializedProp = mapper.readValue(
- writer.toString(), WorkflowFormPropertyTO.class);
+ WorkflowFormPropertyTO unserializedProp = mapper.readValue(writer.toString(), WorkflowFormPropertyTO.class);
assertEquals(prop, unserializedProp);
}
@Test
- public void testReportletConfImplementations()
- throws IOException {
+ public void testReportletConfImplementations() throws IOException {
ReportTO report = new ReportTO();
report.setName("testReportForCreate");
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeApplication.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeApplication.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeApplication.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeApplication.java Thu Mar 15 10:17:12 2012
@@ -52,8 +52,7 @@ import org.syncope.console.pages.Welcome
/**
* SyncopeApplication class.
*/
-public class SyncopeApplication extends WebApplication
- implements IUnauthorizedComponentInstantiationListener,
+public class SyncopeApplication extends WebApplication implements IUnauthorizedComponentInstantiationListener,
IRoleCheckingStrategy {
public static final String IMG_PREFIX = "/img/menu/";
@@ -64,110 +63,83 @@ public class SyncopeApplication extends
@Override
protected void init() {
- getComponentInstantiationListeners().add(
- new SpringComponentInjector(this));
+ getComponentInstantiationListeners().add(new SpringComponentInjector(this));
getResourceSettings().setThrowExceptionOnMissingResource(true);
- getSecuritySettings().
- setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
- getSecuritySettings().
- setUnauthorizedComponentInstantiationListener(this);
+ getSecuritySettings().setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
+ getSecuritySettings().setUnauthorizedComponentInstantiationListener(this);
getMarkupSettings().setStripWicketTags(true);
getRequestCycleListeners().add(new SyncopeRequestCycleListener());
}
- public void setupNavigationPane(final WebPage page,
- final XMLRolesReader xmlRolesReader, final boolean notsel,
+ public void setupNavigationPane(final WebPage page, final XMLRolesReader xmlRolesReader, final boolean notsel,
final String version) {
- page.add(new Label("version", "Console: " + version
- + "; Core: " + SyncopeSession.get().getCoreVersion()));
+ page.add(new Label("version", "Console: " + version + "; Core: " + SyncopeSession.get().getCoreVersion()));
- BookmarkablePageLink schemaLink =
- new BookmarkablePageLink("schema", Schema.class);
- MetaDataRoleAuthorizationStrategy.authorizeAll(
- schemaLink, WebPage.ENABLE);
+ BookmarkablePageLink schemaLink = new BookmarkablePageLink("schema", Schema.class);
+ MetaDataRoleAuthorizationStrategy.authorizeAll(schemaLink, WebPage.ENABLE);
page.add(schemaLink);
- schemaLink.add(
- new Image("schemaIcon",
- new ContextRelativeResource(IMG_PREFIX
- + (notsel ? IMG_NOTSEL : "") + "schema" + IMG_SUFFIX)));
-
- BookmarkablePageLink usersLink =
- new BookmarkablePageLink("users", Users.class);
- String allowedUsersRoles =
- xmlRolesReader.getAllAllowedRoles("Users", "list");
- MetaDataRoleAuthorizationStrategy.authorize(
- usersLink, WebPage.ENABLE, allowedUsersRoles);
+ schemaLink.add(new Image("schemaIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "schema" + IMG_SUFFIX)));
+
+ BookmarkablePageLink usersLink = new BookmarkablePageLink("users", Users.class);
+ String allowedUsersRoles = xmlRolesReader.getAllAllowedRoles("Users", "list");
+ MetaDataRoleAuthorizationStrategy.authorize(usersLink, WebPage.ENABLE, allowedUsersRoles);
page.add(usersLink);
- usersLink.add(new Image("usersIcon",
- new ContextRelativeResource(IMG_PREFIX
- + (notsel ? IMG_NOTSEL : "") + "users" + IMG_SUFFIX)));
-
- BookmarkablePageLink rolesLink =
- new BookmarkablePageLink("roles", Roles.class);
- MetaDataRoleAuthorizationStrategy.authorizeAll(
- rolesLink, WebPage.ENABLE);
+ usersLink.add(new Image("usersIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "users" + IMG_SUFFIX)));
+
+ BookmarkablePageLink rolesLink = new BookmarkablePageLink("roles", Roles.class);
+ MetaDataRoleAuthorizationStrategy.authorizeAll(rolesLink, WebPage.ENABLE);
page.add(rolesLink);
- rolesLink.add(new Image("rolesIcon",
- new ContextRelativeResource(IMG_PREFIX
- + (notsel ? IMG_NOTSEL : "") + "roles" + IMG_SUFFIX)));
-
- BookmarkablePageLink resourcesLink =
- new BookmarkablePageLink("resources", Resources.class);
- MetaDataRoleAuthorizationStrategy.authorizeAll(
- resourcesLink, WebPage.ENABLE);
+ rolesLink.add(new Image("rolesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "roles" + IMG_SUFFIX)));
+
+ BookmarkablePageLink resourcesLink = new BookmarkablePageLink("resources", Resources.class);
+ MetaDataRoleAuthorizationStrategy.authorizeAll(resourcesLink, WebPage.ENABLE);
page.add(resourcesLink);
- resourcesLink.add(new Image("resourcesIcon",
- new ContextRelativeResource(
- IMG_PREFIX + (notsel ? IMG_NOTSEL : "") + "resources"
- + IMG_SUFFIX)));
-
- BookmarkablePageLink todoLink =
- new BookmarkablePageLink("todo", Todo.class);
- MetaDataRoleAuthorizationStrategy.authorize(
- todoLink, WebPage.ENABLE,
- xmlRolesReader.getAllAllowedRoles("Approval", "list"));
+ resourcesLink.add(new Image("resourcesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "resources" + IMG_SUFFIX)));
+
+ BookmarkablePageLink todoLink = new BookmarkablePageLink("todo", Todo.class);
+ MetaDataRoleAuthorizationStrategy.authorize(todoLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles(
+ "Approval", "list"));
page.add(todoLink);
- todoLink.add(new Image("todoIcon",
- new ContextRelativeResource(IMG_PREFIX
- + (notsel ? IMG_NOTSEL : "") + "todo" + IMG_SUFFIX)));
-
- BookmarkablePageLink reportLink =
- new BookmarkablePageLink("reports", Reports.class);
- String allowedReportRoles =
- xmlRolesReader.getAllAllowedRoles("Reports", "list");
- MetaDataRoleAuthorizationStrategy.authorize(
- reportLink, WebPage.ENABLE, allowedReportRoles);
+ todoLink.add(new Image("todoIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "todo" + IMG_SUFFIX)));
+
+ BookmarkablePageLink reportLink = new BookmarkablePageLink("reports", Reports.class);
+ String allowedReportRoles = xmlRolesReader.getAllAllowedRoles("Reports", "list");
+ MetaDataRoleAuthorizationStrategy.authorize(reportLink, WebPage.ENABLE, allowedReportRoles);
page.add(reportLink);
- reportLink.add(new Image("reportsIcon",
- new ContextRelativeResource(IMG_PREFIX
- + (notsel ? IMG_NOTSEL : "") + "reports" + IMG_SUFFIX)));
-
- BookmarkablePageLink configurationLink =
- new BookmarkablePageLink("configuration", Configuration.class);
- String allowedConfigurationRoles =
- xmlRolesReader.getAllAllowedRoles("Configuration", "list");
- MetaDataRoleAuthorizationStrategy.authorize(
- configurationLink, WebPage.ENABLE, allowedConfigurationRoles);
+ reportLink.add(new Image("reportsIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "reports" + IMG_SUFFIX)));
+
+ BookmarkablePageLink configurationLink = new BookmarkablePageLink("configuration", Configuration.class);
+ String allowedConfigurationRoles = xmlRolesReader.getAllAllowedRoles("Configuration", "list");
+ MetaDataRoleAuthorizationStrategy.authorize(configurationLink, WebPage.ENABLE, allowedConfigurationRoles);
page.add(configurationLink);
- configurationLink.add(new Image("configurationIcon",
- new ContextRelativeResource(IMG_PREFIX
- + (notsel ? IMG_NOTSEL : "") + "configuration" + IMG_SUFFIX)));
-
- BookmarkablePageLink taskLink =
- new BookmarkablePageLink("tasks", Tasks.class);
- String allowedTasksRoles =
- xmlRolesReader.getAllAllowedRoles("Tasks", "list");
- MetaDataRoleAuthorizationStrategy.authorize(
- taskLink, WebPage.ENABLE, allowedTasksRoles);
+ configurationLink.add(new Image("configurationIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "configuration" + IMG_SUFFIX)));
+
+ BookmarkablePageLink taskLink = new BookmarkablePageLink("tasks", Tasks.class);
+ String allowedTasksRoles = xmlRolesReader.getAllAllowedRoles("Tasks", "list");
+ MetaDataRoleAuthorizationStrategy.authorize(taskLink, WebPage.ENABLE, allowedTasksRoles);
page.add(taskLink);
- taskLink.add(new Image("tasksIcon",
- new ContextRelativeResource(IMG_PREFIX
- + (notsel ? IMG_NOTSEL : "") + "tasks" + IMG_SUFFIX)));
+ taskLink.add(new Image("tasksIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
+ ? IMG_NOTSEL
+ : "") + "tasks" + IMG_SUFFIX)));
page.add(new BookmarkablePageLink("logout", Logout.class));
}
@@ -196,8 +168,7 @@ public class SyncopeApplication extends
}
@Override
- public boolean hasAnyRole(
- final org.apache.wicket.authroles.authorization.strategies.role.Roles roles) {
+ public boolean hasAnyRole(final org.apache.wicket.authroles.authorization.strategies.role.Roles roles) {
return SyncopeSession.get().hasAnyRole(roles);
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeRequestCycleListener.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeRequestCycleListener.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeRequestCycleListener.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/SyncopeRequestCycleListener.java Thu Mar 15 10:17:12 2012
@@ -39,48 +39,38 @@ public class SyncopeRequestCycleListener
/**
* Logger.
*/
- private static final Logger LOG = LoggerFactory.getLogger(
- SyncopeRequestCycleListener.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SyncopeRequestCycleListener.class);
/**
* {@inheritDoc}
*/
@Override
- public IRequestHandler onException(final RequestCycle cycle,
- final Exception e) {
+ public IRequestHandler onException(final RequestCycle cycle, final Exception e) {
LOG.error("Exception found", e);
final Page errorPage;
PageParameters errorParameters = new PageParameters();
- errorParameters.add("errorTitle",
- new StringResourceModel("alert", null).getString());
+ errorParameters.add("errorTitle", new StringResourceModel("alert", null).getString());
if (e instanceof UnauthorizedInstantiationException) {
- errorParameters.add("errorMessage", new StringResourceModel(
- "unauthorizedInstantiationException", null).getString());
+ errorParameters.add("errorMessage", new StringResourceModel("unauthorizedInstantiationException", null)
+ .getString());
errorPage = new ErrorPage(errorParameters);
} else if (e instanceof HttpClientErrorException) {
- errorParameters.add("errorMessage",
- new StringResourceModel("httpClientException", null).
- getString());
+ errorParameters.add("errorMessage", new StringResourceModel("httpClientException", null).getString());
errorPage = new ErrorPage(errorParameters);
- } else if (e instanceof PageExpiredException
- || !(SyncopeSession.get()).isAuthenticated()) {
+ } else if (e instanceof PageExpiredException || !(SyncopeSession.get()).isAuthenticated()) {
- errorParameters.add("errorMessage",
- new StringResourceModel("pageExpiredException", null).
- getString());
+ errorParameters.add("errorMessage", new StringResourceModel("pageExpiredException", null).getString());
errorPage = new ErrorPage(errorParameters);
} else if (e.getCause() != null && e.getCause().getCause() != null
&& e.getCause().getCause() instanceof RestClientException) {
- errorParameters.add("errorMessage",
- new StringResourceModel("restClientException", null).
- getString());
+ errorParameters.add("errorMessage", new StringResourceModel("restClientException", null).getString());
errorPage = new ErrorPage(errorParameters);
} else {
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/Constants.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/Constants.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/Constants.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/Constants.java Thu Mar 15 10:17:12 2012
@@ -20,82 +20,57 @@ package org.syncope.console.commons;
public final class Constants {
- public static final String PREF_USERS_DETAILS_VIEW =
- "users.details.view";
+ public static final String PREF_USERS_DETAILS_VIEW = "users.details.view";
- public static final String PREF_USERS_ATTRIBUTES_VIEW =
- "users.attributes.view";
+ public static final String PREF_USERS_ATTRIBUTES_VIEW = "users.attributes.view";
- public static final String PREF_USERS_DERIVED_ATTRIBUTES_VIEW =
- "users.derived.attributes.view";
+ public static final String PREF_USERS_DERIVED_ATTRIBUTES_VIEW = "users.derived.attributes.view";
- public static final String PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW =
- "users.virtual.attributes.view";
+ public static final String PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW = "users.virtual.attributes.view";
public static final String PREFS_COOKIE_NAME = "syncopeConsolePrefs";
- public static final String PREF_USER_SCHEMA_PAGINATOR_ROWS =
- "user.schema.paginator.rows";
+ public static final String PREF_USER_SCHEMA_PAGINATOR_ROWS = "user.schema.paginator.rows";
- public static final String PREF_USER_DER_SCHEMA_PAGINATOR_ROWS =
- "user.derived.schema.paginator.rows";
+ public static final String PREF_USER_DER_SCHEMA_PAGINATOR_ROWS = "user.derived.schema.paginator.rows";
- public static final String PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS =
- "user.virtual.schema.paginator.rows";
+ public static final String PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS = "user.virtual.schema.paginator.rows";
- public static final String PREF_ROLE_SCHEMA_PAGINATOR_ROWS =
- "role.schema.paginator.rows";
+ public static final String PREF_ROLE_SCHEMA_PAGINATOR_ROWS = "role.schema.paginator.rows";
- public static final String PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS =
- "role.derived.schema.paginator.rows";
+ public static final String PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS = "role.derived.schema.paginator.rows";
- public static final String PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS =
- "role.virtual.schema.paginator.rows";
+ public static final String PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS = "role.virtual.schema.paginator.rows";
- public static final String PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS =
- "membership.schema.paginator.rows";
+ public static final String PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS = "membership.schema.paginator.rows";
- public static final String PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS =
- "membership.derived.aschema.paginator.rows";
+ public static final String PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS = "membership.derived.aschema.paginator.rows";
- public static final String PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS =
- "membership.virtual.aschema.paginator.rows";
+ public static final String PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS = "membership.virtual.aschema.paginator.rows";
- public static final String PREF_USERS_PAGINATOR_ROWS =
- "users.paginator.rows";
+ public static final String PREF_USERS_PAGINATOR_ROWS = "users.paginator.rows";
- public static final String PREF_RESOURCES_PAGINATOR_ROWS =
- "resources.paginator.rows";
+ public static final String PREF_RESOURCES_PAGINATOR_ROWS = "resources.paginator.rows";
- public static final String PREF_CONNECTORS_PAGINATOR_ROWS =
- "connectors.paginator.rows";
+ public static final String PREF_CONNECTORS_PAGINATOR_ROWS = "connectors.paginator.rows";
- public static final String PREF_CONFIGURATION_PAGINATOR_ROWS =
- "configuration.paginator.rows";
+ public static final String PREF_CONFIGURATION_PAGINATOR_ROWS = "configuration.paginator.rows";
- public static final String PREF_NOTIFICATION_PAGINATOR_ROWS =
- "notification.paginator.rows";
+ public static final String PREF_NOTIFICATION_PAGINATOR_ROWS = "notification.paginator.rows";
- public static final String PREF_PROPAGATION_TASKS_PAGINATOR_ROWS =
- "proagationtasks.paginator.rows";
+ public static final String PREF_PROPAGATION_TASKS_PAGINATOR_ROWS = "proagationtasks.paginator.rows";
- public static final String PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS =
- "notificationtasks.paginator.rows";
+ public static final String PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS = "notificationtasks.paginator.rows";
- public static final String PREF_SCHED_TASKS_PAGINATOR_ROWS =
- "schedtasks.paginator.rows";
+ public static final String PREF_SCHED_TASKS_PAGINATOR_ROWS = "schedtasks.paginator.rows";
- public static final String PREF_SYNC_TASKS_PAGINATOR_ROWS =
- "synctasks.paginator.rows";
+ public static final String PREF_SYNC_TASKS_PAGINATOR_ROWS = "synctasks.paginator.rows";
- public static final String PREF_APPROVAL_PAGINATOR_ROWS =
- "approval.paginator.rows";
+ public static final String PREF_APPROVAL_PAGINATOR_ROWS = "approval.paginator.rows";
- public static final String PREF_USER_REQUEST_PAGINATOR_ROWS =
- "userRequest.paginator.rows";
+ public static final String PREF_USER_REQUEST_PAGINATOR_ROWS = "userRequest.paginator.rows";
- public static final String PREF_REPORT_PAGINATOR_ROWS =
- "report.paginator.rows";
+ public static final String PREF_REPORT_PAGINATOR_ROWS = "report.paginator.rows";
public static final String PAGEPARAM_CREATE = "CREATE";
@@ -108,14 +83,13 @@ public final class Constants {
public static final String ENGLISH_DATE_FORMAT = "MM/dd/yyyy HH:mm:ss";
- public static final String[] SCHEMA_FIELDS = {"name", "type"};
+ public static final String[] SCHEMA_FIELDS = { "name", "type" };
- public static final String[] VIRTUAL_SCHEMA_FIELDS = {"name"};
+ public static final String[] VIRTUAL_SCHEMA_FIELDS = { "name" };
- public static final String[] DERIVED_SCHEMA_FIELDS = {"name", "expression"};
+ public static final String[] DERIVED_SCHEMA_FIELDS = { "name", "expression" };
- public static final String PREF_POLICY_PAGINATOR_ROWS =
- "policy.paginator.rows";
+ public static final String PREF_POLICY_PAGINATOR_ROWS = "policy.paginator.rows";
private Constants() {
}
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/DateFormatROModel.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/DateFormatROModel.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/DateFormatROModel.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/DateFormatROModel.java Thu Mar 15 10:17:12 2012
@@ -36,8 +36,8 @@ public class DateFormatROModel implement
@Override
public String getObject() {
return model.getObject() == null
- ? "" : SyncopeSession.get().getDateFormat().
- format((Date) model.getObject());
+ ? ""
+ : SyncopeSession.get().getDateFormat().format((Date) model.getObject());
}
@Override
Modified: incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/HttpResourceStream.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/HttpResourceStream.java?rev=1300882&r1=1300881&r2=1300882&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/HttpResourceStream.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/syncope/console/commons/HttpResourceStream.java Thu Mar 15 10:17:12 2012
@@ -40,13 +40,11 @@ import org.springframework.http.MediaTyp
import org.springframework.web.client.RestTemplate;
import org.syncope.client.http.PreemptiveAuthHttpRequestFactory;
-public class HttpResourceStream extends AbstractResourceStream
- implements IFixedLocationResourceStream {
+public class HttpResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream {
private static final long serialVersionUID = 5811207817876330189L;
- private static final Logger LOG =
- LoggerFactory.getLogger(HttpResourceStream.class);
+ private static final Logger LOG = LoggerFactory.getLogger(HttpResourceStream.class);
private final URI uri;
@@ -58,8 +56,7 @@ public class HttpResourceStream extends
private transient String filename;
- public HttpResourceStream(final String uri, final RestTemplate restTemplate)
- throws URISyntaxException {
+ public HttpResourceStream(final String uri, final RestTemplate restTemplate) throws URISyntaxException {
this.uri = new URI(Args.notNull(uri, "uri"));
this.restTemplate = Args.notNull(restTemplate, "restTemplate");
@@ -72,9 +69,8 @@ public class HttpResourceStream extends
entity.setContentLength(0);
entity.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
- BasicHttpResponse response = new BasicHttpResponse(
- new ProtocolVersion("HTTP", 1, 1), 400,
- "Exception: " + errorMessage);
+ BasicHttpResponse response = new BasicHttpResponse(new ProtocolVersion("HTTP", 1, 1), 400, "Exception: "
+ + errorMessage);
response.setEntity(entity);
response.addHeader("Content-Disposition", "attachment; filename=error");
@@ -90,17 +86,15 @@ public class HttpResourceStream extends
HttpGet getMethod = new HttpGet(this.uri);
HttpResponse response;
try {
- response = ((PreemptiveAuthHttpRequestFactory) restTemplate.
- getRequestFactory()).getHttpClient().execute(getMethod);
+ response = ((PreemptiveAuthHttpRequestFactory) restTemplate.getRequestFactory()).getHttpClient().execute(
+ getMethod);
} catch (Exception e) {
- LOG.error("Unexpected exception while executing HTTP method to {}",
- this.uri, e);
+ LOG.error("Unexpected exception while executing HTTP method to {}", this.uri, e);
response = buildFakeResponse(e.getMessage());
}
if (response.getStatusLine().getStatusCode() != 200) {
LOG.error("Unsuccessful HTTP method to {}", this.uri);
- response = buildFakeResponse("HTTP status "
- + response.getStatusLine().getStatusCode());
+ response = buildFakeResponse("HTTP status " + response.getStatusLine().getStatusCode());
}
responseEntity = response.getEntity();
@@ -120,8 +114,7 @@ public class HttpResourceStream extends
}
@Override
- public InputStream getInputStream()
- throws ResourceStreamNotFoundException {
+ public InputStream getInputStream() throws ResourceStreamNotFoundException {
try {
execute();
@@ -132,8 +125,7 @@ public class HttpResourceStream extends
}
@Override
- public void close()
- throws IOException {
+ public void close() throws IOException {
// Nothing needed here, because we are using HttpComponents HttpClient
}
@@ -147,7 +139,8 @@ public class HttpResourceStream extends
execute();
return contentType == null
- ? MediaType.APPLICATION_OCTET_STREAM_VALUE : contentType;
+ ? MediaType.APPLICATION_OCTET_STREAM_VALUE
+ : contentType;
}
public String getFilename() {