syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbernha...@apache.org
Subject svn commit: r1437879 - in /syncope/trunk/common/src/main/java/org/apache/syncope/common: ./ to/ types/
Date Thu, 24 Jan 2013 07:48:02 GMT
Author: jbernhardt
Date: Thu Jan 24 07:48:01 2013
New Revision: 1437879

URL: http://svn.apache.org/viewvc?rev=1437879&view=rev
Log:
[SYNCOPE-231]
* Adding JAX-B Annotations for TOs and Types
* Adding REST Header constant for IDs

Added:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/JobClassTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncActionClassTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/LoggerType.java
Modified:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeConstants.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/ConnObjectTO.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/NotificationTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.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/SchedTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.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/TaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TaskType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java Thu
Jan 24 07:48:01 2013
@@ -31,4 +31,11 @@ public class SyncopeConstants {
 
     public static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:ssZ";
 
+    /**
+     * This constant will be used to identify HTTP header key to look for object ID assigned
+     * to an object after its creation. HTTP Response after PUT operation should contain
this
+     * key with resource id as its value.
+     */
+    public static final String REST_HEADER_ID = "org.apache.syncope.id";
+
 }

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=1437879&r1=1437878&r2=1437879&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 Thu Jan
24 07:48:01 2013
@@ -21,8 +21,15 @@ package org.apache.syncope.common.to;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.syncope.common.AbstractBaseBean;
 
+@XmlRootElement(name = "attribute")
+@XmlType
 public class AttributeTO extends AbstractBaseBean {
 
     private static final long serialVersionUID = 4941691338796323623L;
@@ -89,6 +96,8 @@ public class AttributeTO extends Abstrac
     /**
      * @return attribute values as strings
      */
+    @XmlElementWrapper(name = "values")
+    @XmlElement(name = "value")
     public List<String> getValues() {
         return values;
     }

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=1437879&r1=1437878&r2=1437879&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 Thu
Jan 24 07:48:01 2013
@@ -24,9 +24,16 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.syncope.common.AbstractBaseBean;
 import org.codehaus.jackson.annotate.JsonIgnore;
 
+@XmlRootElement(name = "connector")
+@XmlType
 public class ConnObjectTO extends AbstractBaseBean {
 
     private static final long serialVersionUID = 5139554911265442497L;
@@ -47,6 +54,8 @@ public class ConnObjectTO extends Abstra
         return attributes.remove(attribute);
     }
 
+    @XmlElementWrapper(name = "attributes")
+    @XmlElement(name = "attribute")
     public List<AttributeTO> getAttributes() {
         return attributes;
     }

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/JobClassTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/JobClassTO.java?rev=1437879&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/JobClassTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/JobClassTO.java Thu Jan
24 07:48:01 2013
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.syncope.common.AbstractBaseBean;
+
+@XmlRootElement(name = "jobClass")
+@XmlType
+public class JobClassTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -1953799905627918822L;
+
+    private String name;
+
+    public static JobClassTO instance(final String name) {
+        JobClassTO instance = new JobClassTO();
+        instance.setName(name);
+        return instance;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(final String name) {
+        this.name = name;
+    }
+}

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=1437879&r1=1437878&r2=1437879&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 Thu
Jan 24 07:48:01 2013
@@ -22,6 +22,13 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "membership")
+@XmlType
 public class MembershipTO extends AbstractAttributableTO {
 
     private static final long serialVersionUID = 5992828670273935861L;
@@ -57,6 +64,8 @@ public class MembershipTO extends Abstra
     }
 
     @Override
+    @XmlElementWrapper(name = "resources")
+    @XmlElement(name = "resource")
     public Set<String> getResources() {
         return Collections.<String>emptySet();
     }

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=1437879&r1=1437878&r2=1437879&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
Thu Jan 24 07:48:01 2013
@@ -21,13 +21,20 @@ package org.apache.syncope.common.to;
 import java.util.HashSet;
 import java.util.Set;
 
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.syncope.common.types.TraceLevel;
 
+@XmlRootElement(name = "notificationTask")
+@XmlType
 public class NotificationTaskTO extends TaskTO {
 
     private static final long serialVersionUID = 371671242591093846L;
 
-    private Set<String> recipients;
+    private final Set<String> recipients;
 
     private String sender;
 
@@ -47,6 +54,8 @@ public class NotificationTaskTO extends 
         recipients = new HashSet<String>();
     }
 
+    @XmlElementWrapper(name = "recipients")
+    @XmlElement(name = "recipient")
     public Set<String> getRecipients() {
         return recipients;
     }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java
(original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java
Thu Jan 24 07:48:01 2013
@@ -18,10 +18,15 @@
  */
 package org.apache.syncope.common.to;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.PropagationMode;
 import org.apache.syncope.common.types.ResourceOperation;
 
+@XmlRootElement(name = "propagationTask")
+@XmlType
 public class PropagationTaskTO extends TaskTO {
 
     private static final long serialVersionUID = 386450127003321197L;

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=1437879&r1=1437878&r2=1437879&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 Thu Jan 24
07:48:01 2013
@@ -20,8 +20,16 @@ package org.apache.syncope.common.to;
 
 import java.util.ArrayList;
 import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 
+@XmlRootElement(name = "role")
+@XmlType
 @JsonIgnoreProperties({"displayName"})
 public class RoleTO extends AbstractAttributableTO {
 
@@ -47,7 +55,7 @@ public class RoleTO extends AbstractAttr
 
     private boolean inheritAccountPolicy;
 
-    private List<String> entitlements;
+    private final List<String> entitlements;
 
     private Long passwordPolicy;
 
@@ -130,6 +138,8 @@ public class RoleTO extends AbstractAttr
         return entitlements.remove(entitlement);
     }
 
+    @XmlElementWrapper(name = "entitlements")
+    @XmlElement(name = "entitlement")
     public List<String> getEntitlements() {
         return entitlements;
     }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java Thu Jan
24 07:48:01 2013
@@ -20,6 +20,11 @@ package org.apache.syncope.common.to;
 
 import java.util.Date;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "schedTask")
+@XmlType
 public class SchedTaskTO extends TaskTO {
 
     private static final long serialVersionUID = -5722284116974636425L;

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncActionClassTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncActionClassTO.java?rev=1437879&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncActionClassTO.java
(added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncActionClassTO.java
Thu Jan 24 07:48:01 2013
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.syncope.common.AbstractBaseBean;
+
+@XmlRootElement(name = "syncActionClass")
+@XmlType
+public class SyncActionClassTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -3379629287646343560L;
+
+    private String name;
+
+    public static SyncActionClassTO instance(final String name) {
+        SyncActionClassTO instance = new SyncActionClassTO();
+        instance.setName(name);
+        return instance;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(final String name) {
+        this.name = name;
+    }
+}

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java Thu Jan
24 07:48:01 2013
@@ -18,6 +18,11 @@
  */
 package org.apache.syncope.common.to;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "syncTask")
+@XmlType
 public class SyncTaskTO extends SchedTaskTO {
 
     private static final long serialVersionUID = -2143537546915809016L;

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=1437879&r1=1437878&r2=1437879&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 Thu Jan
24 07:48:01 2013
@@ -18,6 +18,11 @@
  */
 package org.apache.syncope.common.to;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "taskExecution")
+@XmlType
 public class TaskExecTO extends AbstractExecTO {
 
     private static final long serialVersionUID = -5401795154606268973L;

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java Thu Jan 24
07:48:01 2013
@@ -22,8 +22,15 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.syncope.common.AbstractBaseBean;
 
+@XmlRootElement
+@XmlType
 public class TaskTO extends AbstractBaseBean {
 
     private static final long serialVersionUID = 386450127003321197L;
@@ -33,9 +40,9 @@ public class TaskTO extends AbstractBase
     private String latestExecStatus;
 
     private List<TaskExecTO> executions;
-    
+
     private Date startDate;
-    
+
     private Date endDate;
 
     public TaskTO() {
@@ -68,6 +75,8 @@ public class TaskTO extends AbstractBase
         return executions.remove(execution);
     }
 
+    @XmlElementWrapper(name = "excecutions")
+    @XmlElement(name = "excecution")
     public List<TaskExecTO> getExecutions() {
         return executions;
     }

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=1437879&r1=1437878&r2=1437879&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 Thu Jan 24
07:48:01 2013
@@ -25,10 +25,18 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 import org.codehaus.jackson.annotate.JsonIgnore;
 
+@XmlRootElement(name = "user")
+@XmlType
 public class UserTO extends AbstractAttributableTO {
 
     private static final long serialVersionUID = 7791304495192615740L;
@@ -75,6 +83,8 @@ public class UserTO extends AbstractAttr
         return memberships.remove(membershipTO);
     }
 
+    @XmlElementWrapper(name = "memberships")
+    @XmlElement(name = "membership")
     public List<MembershipTO> getMemberships() {
         return memberships;
     }

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/LoggerType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/LoggerType.java?rev=1437879&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/LoggerType.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/LoggerType.java Thu
Jan 24 07:48:01 2013
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.types;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
+public enum LoggerType {
+
+    /**
+     * This type describes a common logger used to handle system and application events.
+     */
+    NORMAL,
+
+    /**
+     * Audit logger only focus on security related events, usually logging how did what and
when.
+     * In case of a security incident audit loggers should allow an administrator to recall
all
+     * actions a certain user has done.
+     */
+    AUDIT;
+
+    public static LoggerType fromString(String value) {
+        return LoggerType.valueOf(value.toUpperCase());
+    }
+}

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
(original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
Thu Jan 24 07:48:01 2013
@@ -18,6 +18,9 @@
  */
 package org.apache.syncope.common.types;
 
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
 public enum PropagationMode {
 
     ONE_PHASE,

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
(original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
Thu Jan 24 07:48:01 2013
@@ -18,6 +18,8 @@
  */
 package org.apache.syncope.common.types;
 
+import javax.xml.bind.annotation.XmlEnum;
+
 /**
  * Status of a TaskExecution.
  *
@@ -28,6 +30,7 @@ package org.apache.syncope.common.types;
  *
  * @see TaskExecution
  */
+@XmlEnum
 public enum PropagationTaskExecStatus {
 
     CREATED,

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
(original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
Thu Jan 24 07:48:01 2013
@@ -18,6 +18,9 @@
  */
 package org.apache.syncope.common.types;
 
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
 public enum ResourceOperation {
 
     CREATE,

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TaskType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TaskType.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TaskType.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TaskType.java Thu Jan
24 07:48:01 2013
@@ -18,6 +18,9 @@
  */
 package org.apache.syncope.common.types;
 
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
 public enum TaskType {
 
     PROPAGATION("propagation"),
@@ -38,12 +41,12 @@ public enum TaskType {
 
     public static TaskType fromString(String name) {
         if (name != null) {
-          for (TaskType t : TaskType.values()) {
-            if (t.name.equalsIgnoreCase(name)) {
-              return t;
+            for (TaskType t : TaskType.values()) {
+                if (t.name.equalsIgnoreCase(name)) {
+                    return t;
+                }
             }
-          }
         }
         return null;
-      }
+    }
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java?rev=1437879&r1=1437878&r2=1437879&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java Thu
Jan 24 07:48:01 2013
@@ -18,6 +18,9 @@
  */
 package org.apache.syncope.common.types;
 
+import javax.xml.bind.annotation.XmlEnum;
+
+@XmlEnum
 public enum TraceLevel {
 
     /**



Mime
View raw message