syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbernha...@apache.org
Subject svn commit: r1436230 [4/14] - in /syncope/trunk: ./ client/ client/src/main/java/org/apache/syncope/annotation/ client/src/main/java/org/apache/syncope/client/ client/src/main/java/org/apache/syncope/client/mod/ client/src/main/java/org/apache/syncope/...
Date Mon, 21 Jan 2013 09:09:04 GMT
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,97 @@
+/*
+ * 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 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;
+import org.apache.syncope.common.types.ConnConfPropSchema;
+
+@XmlRootElement(name = "connectorBundle")
+@XmlType
+public class ConnBundleTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 7215115961910138005L;
+
+    private String displayName;
+
+    private String bundleName;
+
+    private String version;
+
+    private String connectorName;
+
+    private List<ConnConfPropSchema> properties = new ArrayList<ConnConfPropSchema>();
+
+    public String getBundleName() {
+        return bundleName;
+    }
+
+    public void setBundleName(final String bundleName) {
+        this.bundleName = bundleName;
+    }
+
+    public String getConnectorName() {
+        return connectorName;
+    }
+
+    public void setConnectorName(final String connectorName) {
+        this.connectorName = connectorName;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public void setDisplayName(final String displayName) {
+        this.displayName = displayName;
+    }
+
+    @XmlElementWrapper(name = "properties")
+    @XmlElement(name = "connConfPropSchema")
+    public List<ConnConfPropSchema> getProperties() {
+        return properties;
+    }
+
+    public void setProperties(final List<ConnConfPropSchema> properties) {
+        this.properties = properties;
+    }
+
+    public boolean addProperty(final ConnConfPropSchema property) {
+        return properties.add(property);
+    }
+
+    public boolean removeProperty(final ConnConfPropSchema property) {
+        return properties.remove(property);
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(final String version) {
+        this.version = version;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,163 @@
+/*
+ * 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 java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+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.codehaus.jackson.annotate.JsonIgnore;
+import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.ConnConfProperty;
+import org.apache.syncope.common.types.ConnectorCapability;
+
+@XmlRootElement(name = "connector")
+@XmlType
+public class ConnInstanceTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 2707778645445168671L;
+
+    private long id;
+
+    private String bundleName;
+
+    private String version;
+
+    private String connectorName;
+
+    private final Set<ConnConfProperty> configuration;
+
+    private final Set<ConnectorCapability> capabilities;
+
+    private String displayName;
+
+    public ConnInstanceTO() {
+        super();
+
+        configuration = new HashSet<ConnConfProperty>();
+        capabilities = EnumSet.noneOf(ConnectorCapability.class);
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getBundleName() {
+        return bundleName;
+    }
+
+    public void setBundleName(String bundlename) {
+        this.bundleName = bundlename;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String bundleversion) {
+        this.version = bundleversion;
+    }
+
+    @XmlElementWrapper(name = "configuration")
+    @XmlElement(name = "property")
+    public Set<ConnConfProperty> getConfiguration() {
+        return this.configuration;
+    }
+
+    @JsonIgnore
+    public Map<String, ConnConfProperty> getConfigurationMap() {
+        Map<String, ConnConfProperty> result;
+
+        if (getConfiguration() == null) {
+            result = Collections.emptyMap();
+        } else {
+            result = new HashMap<String, ConnConfProperty>();
+            for (ConnConfProperty prop : getConfiguration()) {
+                result.put(prop.getSchema().getName(), prop);
+            }
+            result = Collections.unmodifiableMap(result);
+        }
+
+        return result;
+    }
+
+    public boolean addConfiguration(ConnConfProperty property) {
+        return this.configuration.add(property);
+    }
+
+    public boolean removeConfiguration(ConnConfProperty property) {
+        return this.configuration.remove(property);
+    }
+
+    public void setConfiguration(Set<ConnConfProperty> configuration) {
+        this.configuration.clear();
+        if (configuration != null && !configuration.isEmpty()) {
+            this.configuration.addAll(configuration);
+        }
+    }
+
+    public String getConnectorName() {
+        return connectorName;
+    }
+
+    public void setConnectorName(String connectorname) {
+        this.connectorName = connectorname;
+    }
+
+    public boolean addCapability(ConnectorCapability capability) {
+        return capabilities.add(capability);
+    }
+
+    public boolean removeCapability(ConnectorCapability capability) {
+        return capabilities.remove(capability);
+    }
+
+    @XmlElementWrapper(name = "capabilities")
+    @XmlElement(name = "capability")
+    public Set<ConnectorCapability> getCapabilities() {
+        return capabilities;
+    }
+
+    public void setCapabilities(final Set<ConnectorCapability> capabilities) {
+        this.capabilities.clear();
+        if (capabilities != null && !capabilities.isEmpty()) {
+            this.capabilities.addAll(capabilities);
+        }
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,74 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.syncope.common.AbstractBaseBean;
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+public class ConnObjectTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 5139554911265442497L;
+
+    private List<AttributeTO> attributes;
+
+    public ConnObjectTO() {
+        super();
+
+        attributes = new ArrayList<AttributeTO>();
+    }
+
+    public boolean addAttribute(final AttributeTO attribute) {
+        return attributes.add(attribute);
+    }
+
+    public boolean removeAttribute(final AttributeTO attribute) {
+        return attributes.remove(attribute);
+    }
+
+    public List<AttributeTO> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(final List<AttributeTO> attributes) {
+        this.attributes = attributes;
+    }
+
+    @JsonIgnore
+    public Map<String, AttributeTO> getAttributeMap() {
+        Map<String, AttributeTO> result;
+
+        if (attributes == null) {
+            result = Collections.<String, AttributeTO>emptyMap();
+        } else {
+            result = new HashMap<String, AttributeTO>(attributes.size());
+            for (AttributeTO attributeTO : attributes) {
+                result.put(attributeTO.getSchema(), attributeTO);
+            }
+            result = Collections.<String, AttributeTO>unmodifiableMap(result);
+        }
+
+        return result;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,35 @@
+/*
+ * 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;
+
+
+public class DerivedSchemaTO extends AbstractSchemaTO {
+
+    private static final long serialVersionUID = -6747399803792103108L;
+
+    private String expression;
+
+    public String getExpression() {
+        return expression;
+    }
+
+    public void setExpression(String expression) {
+        this.expression = expression;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/EntitlementTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/EntitlementTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/EntitlementTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/EntitlementTO.java Mon Jan 21 09:08:54 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 = "entitlement")
+@XmlType
+public class EntitlementTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 7133614577172038452L;
+
+    private String name;
+
+    public static EntitlementTO instance(final String name) {
+        EntitlementTO instance = new EntitlementTO();
+        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;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,47 @@
+/*
+ * 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 org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.SyncopeLoggerLevel;
+
+public class LoggerTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -7794833835668648505L;
+
+    private String name;
+
+    private SyncopeLoggerLevel level;
+
+    public SyncopeLoggerLevel getLevel() {
+        return level;
+    }
+
+    public void setLevel(final SyncopeLoggerLevel level) {
+        this.level = level;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MailTemplateTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MailTemplateTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MailTemplateTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MailTemplateTO.java Mon Jan 21 09:08:54 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 = "mailTemplate")
+@XmlType
+public class MailTemplateTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 7232619557172031478L;
+
+    private String name;
+
+    public static MailTemplateTO instance(final String name) {
+        MailTemplateTO templateTO = new MailTemplateTO();
+        templateTO.setName(name);
+        return templateTO;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(final String name) {
+        this.name = name;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,116 @@
+/*
+ * 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 org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.IntMappingType;
+
+public class MappingItemTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 2983498836767176862L;
+
+    private Long id;
+
+    /**
+     * Attribute schema to be mapped. Consider that we can associate tha same attribute schema more than once, with
+     * different aliases, to different resource attributes.
+     */
+    private String intAttrName;
+
+    /**
+     * Schema type to be mapped.
+     */
+    private IntMappingType intMappingType;
+
+    /**
+     * External resource's field to be mapped.
+     */
+    private String extAttrName;
+
+    /**
+     * Specify if the mapped target resource's field is the key.
+     */
+    private boolean accountid;
+
+    /**
+     * Specify if the mapped target resource's field is the password.
+     */
+    private boolean password;
+
+    /**
+     * Specify if the mapped target resource's field is nullable.
+     */
+    private String mandatoryCondition = "false";
+
+    public boolean isAccountid() {
+        return accountid;
+    }
+
+    public void setAccountid(boolean accountid) {
+        this.accountid = accountid;
+    }
+
+    public String getExtAttrName() {
+        return extAttrName;
+    }
+
+    public void setExtAttrName(String extAttrName) {
+        this.extAttrName = extAttrName;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getMandatoryCondition() {
+        return mandatoryCondition;
+    }
+
+    public void setMandatoryCondition(String mandatoryCondition) {
+        this.mandatoryCondition = mandatoryCondition;
+    }
+
+    public boolean isPassword() {
+        return password;
+    }
+
+    public void setPassword(boolean password) {
+        this.password = password;
+    }
+
+    public String getIntAttrName() {
+        return intAttrName;
+    }
+
+    public void setIntAttrName(String intAttrName) {
+        this.intAttrName = intAttrName;
+    }
+
+    public IntMappingType getIntMappingType() {
+        return intMappingType;
+    }
+
+    public void setIntMappingType(IntMappingType intMappingType) {
+        this.intMappingType = intMappingType;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,124 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.IntMappingType;
+
+public class MappingTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 8447688036282611118L;
+
+    private String accountLink;
+
+    private List<MappingItemTO> items;
+
+    public MappingTO() {
+        super();
+
+        items = new ArrayList<MappingItemTO>();
+    }
+
+    public String getAccountLink() {
+        return accountLink;
+    }
+
+    public void setAccountLink(String accountLink) {
+        this.accountLink = accountLink;
+    }
+
+    public <T extends MappingItemTO> T getAccountIdItem() {
+        T accountIdItem = null;
+        for (MappingItemTO item : getItems()) {
+            if (item.isAccountid()) {
+                accountIdItem = (T) item;
+            }
+        }
+        return accountIdItem;
+    }
+
+    protected <T extends MappingItemTO> boolean addAccountIdItem(final T accountIdItem) {
+        if (IntMappingType.UserVirtualSchema == accountIdItem.getIntMappingType()
+                || IntMappingType.RoleVirtualSchema == accountIdItem.getIntMappingType()
+                || IntMappingType.MembershipVirtualSchema == accountIdItem.getIntMappingType()
+                || IntMappingType.Password == accountIdItem.getIntMappingType()) {
+
+            throw new IllegalArgumentException("Virtual attributes cannot be set as accountId");
+        }
+        if (IntMappingType.Password == accountIdItem.getIntMappingType()) {
+            throw new IllegalArgumentException("Password attributes cannot be set as accountId");
+        }
+
+        accountIdItem.setExtAttrName("__NAME__");
+        accountIdItem.setAccountid(true);
+
+        return this.addItem(accountIdItem);
+    }
+
+    public boolean setAccountIdItem(final MappingItemTO accountIdItem) {
+        if (accountIdItem == null) {
+            return this.removeItem(getAccountIdItem());
+        } else {
+            return addAccountIdItem(accountIdItem);
+        }
+    }
+
+    public MappingItemTO getPasswordItem() {
+        MappingItemTO passwordItem = null;
+        for (MappingItemTO item : getItems()) {
+            if (item.isPassword()) {
+                passwordItem = item;
+            }
+        }
+        return passwordItem;
+    }
+
+    public boolean setPasswordItem(final MappingItemTO passwordItem) {
+        if (passwordItem == null) {
+            return this.removeItem(getPasswordItem());
+        } else {
+            passwordItem.setExtAttrName("__PASSWORD__");
+            passwordItem.setPassword(true);
+            return addItem(passwordItem);
+        }
+    }
+
+    public <T extends MappingItemTO> List<T> getItems() {
+        return (List<T>) items;
+    }
+
+    public boolean addItem(final MappingItemTO item) {
+        return item == null ? false : this.items.contains(item) || this.items.add(item);
+    }
+
+    public boolean removeItem(final MappingItemTO item) {
+        return this.items.remove(item);
+    }
+
+    public void setItems(final Collection<MappingItemTO> items) {
+        this.items.clear();
+        if (items != null && !items.isEmpty()) {
+            this.items.addAll(items);
+        }
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,86 @@
+/*
+ * 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 java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+public class MembershipTO extends AbstractAttributableTO {
+
+    private static final long serialVersionUID = 5992828670273935861L;
+
+    private long roleId;
+
+    private String roleName;
+
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    @Override
+    public boolean addResource(String resource) {
+        return false;
+    }
+
+    @Override
+    public boolean removeResource(String resource) {
+        return false;
+    }
+
+    @Override
+    public Set<String> getResources() {
+        return Collections.EMPTY_SET;
+    }
+
+    @Override
+    public void setResources(Set<String> resources) {
+    }
+
+    @Override
+    public boolean addPropagationTO(PropagationTO status) {
+        return false;
+    }
+
+    @Override
+    public boolean removePropagationTO(String resource) {
+        return false;
+    }
+
+    @Override
+    public List<PropagationTO> getPropagationTOs() {
+        return Collections.EMPTY_LIST;
+    }
+
+    @Override
+    public void setPropagationTOs(List<PropagationTO> propagationTOs) {
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,154 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.List;
+
+import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.search.NodeCond;
+import org.apache.syncope.common.types.IntMappingType;
+import org.apache.syncope.common.types.TraceLevel;
+
+public class NotificationTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -6145117115632592612L;
+
+    private Long id;
+
+    private List<String> events;
+
+    private NodeCond about;
+
+    private NodeCond recipients;
+
+    private IntMappingType recipientAttrType;
+
+    private String recipientAttrName;
+
+    private boolean selfAsRecipient;
+
+    private String sender;
+
+    private String subject;
+
+    private String template;
+
+    private TraceLevel traceLevel;
+
+    public NotificationTO() {
+        events = new ArrayList<String>();
+    }
+
+    public NodeCond getAbout() {
+        return about;
+    }
+
+    public void setAbout(NodeCond about) {
+        this.about = about;
+    }
+
+    public List<String> getEvents() {
+        return events;
+    }
+
+    public boolean addEvent(final String event) {
+        return event != null && !events.contains(event) && events.add(event);
+    }
+
+    public boolean removeEvent(final String event) {
+        return event != null && events.remove(event);
+    }
+
+    public void setEvents(List<String> events) {
+        this.events = events;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public NodeCond getRecipients() {
+        return recipients;
+    }
+
+    public void setRecipients(NodeCond recipients) {
+        this.recipients = recipients;
+    }
+
+    public String getRecipientAttrName() {
+        return recipientAttrName;
+    }
+
+    public void setRecipientAttrName(String recipientAttrName) {
+        this.recipientAttrName = recipientAttrName;
+    }
+
+    public IntMappingType getRecipientAttrType() {
+        return recipientAttrType;
+    }
+
+    public void setRecipientAttrType(IntMappingType recipientAttrType) {
+        this.recipientAttrType = recipientAttrType;
+    }
+
+    public boolean isSelfAsRecipient() {
+        return selfAsRecipient;
+    }
+
+    public void setSelfAsRecipient(boolean selfAsRecipient) {
+        this.selfAsRecipient = selfAsRecipient;
+    }
+
+    public String getSender() {
+        return sender;
+    }
+
+    public void setSender(String sender) {
+        this.sender = sender;
+    }
+
+    public String getSubject() {
+        return subject;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    public String getTemplate() {
+        return template;
+    }
+
+    public void setTemplate(String template) {
+        this.template = template;
+    }
+
+    public TraceLevel getTraceLevel() {
+        return traceLevel;
+    }
+
+    public void setTraceLevel(TraceLevel traceLevel) {
+        this.traceLevel = traceLevel;
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,116 @@
+/*
+ * 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 java.util.HashSet;
+import java.util.Set;
+
+import org.apache.syncope.common.types.TraceLevel;
+
+public class NotificationTaskTO extends TaskTO {
+
+    private static final long serialVersionUID = 371671242591093846L;
+
+    private Set<String> recipients;
+
+    private String sender;
+
+    private String subject;
+
+    private String textBody;
+
+    private String htmlBody;
+
+    private boolean executed;
+
+    private TraceLevel traceLevel;
+
+    public NotificationTaskTO() {
+        super();
+
+        recipients = new HashSet<String>();
+    }
+
+    public Set<String> getRecipients() {
+        return recipients;
+    }
+
+    public boolean addRecipient(final String recipient) {
+        return recipients.add(recipient);
+    }
+
+    public boolean removeRecipient(final String recipient) {
+        return recipients.remove(recipient);
+    }
+
+    public void setRecipients(final Set<String> recipients) {
+        this.recipients.clear();
+        if (recipients != null) {
+            this.recipients.addAll(recipients);
+        }
+    }
+
+    public String getSender() {
+        return sender;
+    }
+
+    public void setSender(final String sender) {
+        this.sender = sender;
+    }
+
+    public String getSubject() {
+        return subject;
+    }
+
+    public void setSubject(final String subject) {
+        this.subject = subject;
+    }
+
+    public String getTextBody() {
+        return textBody;
+    }
+
+    public void setTextBody(final String textBody) {
+        this.textBody = textBody;
+    }
+
+    public String getHtmlBody() {
+        return htmlBody;
+    }
+
+    public void setHtmlBody(final String htmlBody) {
+        this.htmlBody = htmlBody;
+    }
+
+    public boolean isExecuted() {
+        return executed;
+    }
+
+    public void setExecuted(boolean executed) {
+        this.executed = executed;
+    }
+
+    public TraceLevel getTraceLevel() {
+        return traceLevel;
+    }
+
+    public void setTraceLevel(TraceLevel traceLevel) {
+        this.traceLevel = traceLevel;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.syncope.common.types.PasswordPolicySpec;
+import org.apache.syncope.common.types.PolicyType;
+
+public class PasswordPolicyTO extends PolicyTO {
+
+    private static final long serialVersionUID = -5606086441294799690L;
+
+    private PasswordPolicySpec specification;
+
+    public PasswordPolicyTO() {
+        this(false);
+    }
+
+    public PasswordPolicyTO(boolean global) {
+        super();
+
+        this.type = global
+                ? PolicyType.GLOBAL_PASSWORD
+                : PolicyType.PASSWORD;
+    }
+
+    public void setSpecification(final PasswordPolicySpec specification) {
+        this.specification = specification;
+    }
+
+    public PasswordPolicySpec getSpecification() {
+        return specification;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PolicyTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PolicyTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PolicyTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PolicyTO.java Mon Jan 21 09:08:54 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 org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.PolicyType;
+
+public abstract class PolicyTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -2903888572649721035L;
+
+    private long id;
+
+    private String description;
+
+    protected PolicyType type;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public PolicyType getType() {
+        return type;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,125 @@
+/*
+ * 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 org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.PropagationTaskExecStatus;
+
+/**
+ * Single propagation status.
+ */
+public class PropagationTO extends AbstractBaseBean {
+
+    /**
+     * Serial version ID.
+     */
+    private static final long serialVersionUID = 3921498450222857690L;
+
+    /**
+     * Object before propagation.
+     */
+    private ConnObjectTO beforeObj;
+
+    /**
+     * Object after propagation.
+     */
+    private ConnObjectTO afterObj;
+
+    /**
+     * Propagated resource name.
+     */
+    private String resourceName;
+
+    /**
+     * Propagation task execution status.
+     */
+    private PropagationTaskExecStatus status;
+
+    /**
+     * After object getter.
+     *
+     * @return after object.
+     */
+    public ConnObjectTO getAfterObj() {
+        return afterObj;
+    }
+
+    /**
+     * After object setter.
+     *
+     * @param afterObj object.
+     */
+    public void setAfterObj(final ConnObjectTO afterObj) {
+        this.afterObj = afterObj;
+    }
+
+    /**
+     * Before object getter.
+     *
+     * @return before object.
+     */
+    public ConnObjectTO getBeforeObj() {
+        return beforeObj;
+    }
+
+    /**
+     * Before object setter.
+     *
+     * @param beforeObj object.
+     */
+    public void setBeforeObj(final ConnObjectTO beforeObj) {
+        this.beforeObj = beforeObj;
+    }
+
+    /**
+     * resource name getter.
+     *
+     * @return resource name.
+     */
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    /**
+     * Resource name setter.
+     *
+     * @param resourceName resource name.
+     */
+    public void setResourceName(final String resourceName) {
+        this.resourceName = resourceName;
+    }
+
+    /**
+     * Propagation execution status getter.
+     *
+     * @return status.
+     */
+    public PropagationTaskExecStatus getStatus() {
+        return status;
+    }
+
+    /**
+     * Propagation execution status setter.
+     *
+     * @param status propagation execution status.
+     */
+    public void setStatus(final PropagationTaskExecStatus status) {
+        this.status = status;
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,119 @@
+/*
+ * 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 org.apache.syncope.common.types.AttributableType;
+import org.apache.syncope.common.types.PropagationMode;
+import org.apache.syncope.common.types.ResourceOperation;
+
+public class PropagationTaskTO extends TaskTO {
+
+    private static final long serialVersionUID = 386450127003321197L;
+
+    private PropagationMode propagationMode;
+
+    private ResourceOperation propagationOperation;
+
+    private String accountId;
+
+    private String oldAccountId;
+
+    private String xmlAttributes;
+
+    private String resource;
+
+    private String objectClassName;
+
+    private AttributableType subjectType;
+
+    private Long subjectId;
+
+    public String getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(String accountId) {
+        this.accountId = accountId;
+    }
+
+    public String getOldAccountId() {
+        return oldAccountId;
+    }
+
+    public void setOldAccountId(String oldAccountId) {
+        this.oldAccountId = oldAccountId;
+    }
+
+    public PropagationMode getPropagationMode() {
+        return propagationMode;
+    }
+
+    public void setPropagationMode(PropagationMode propagationMode) {
+        this.propagationMode = propagationMode;
+    }
+
+    public String getResource() {
+        return resource;
+    }
+
+    public void setResource(String resource) {
+        this.resource = resource;
+    }
+
+    public ResourceOperation getPropagationOperation() {
+        return propagationOperation;
+    }
+
+    public void setPropagationOperation(ResourceOperation propagationOperation) {
+
+        this.propagationOperation = propagationOperation;
+    }
+
+    public String getXmlAttributes() {
+        return xmlAttributes;
+    }
+
+    public void setXmlAttributes(String xmlAttributes) {
+        this.xmlAttributes = xmlAttributes;
+    }
+
+    public String getObjectClassName() {
+        return objectClassName;
+    }
+
+    public void setObjectClassName(String objectClassName) {
+        this.objectClassName = objectClassName;
+    }
+
+    public AttributableType getSubjectType() {
+        return subjectType;
+    }
+
+    public void setSubjectType(AttributableType subjectType) {
+        this.subjectType = subjectType;
+    }
+
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,40 @@
+/*
+ * 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 org.apache.syncope.common.types.ReportExecStatus;
+
+public class ReportExecTO extends AbstractExecTO {
+
+    private static final long serialVersionUID = -1025555939724089215L;
+
+    private long report;
+
+    public long getReport() {
+        return report;
+    }
+
+    public void setReport(long report) {
+        this.report = report;
+    }
+
+    public void setStatus(ReportExecStatus status) {
+        super.setStatus(status.name());
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,169 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.report.ReportletConf;
+
+public class ReportTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = 5274568072084814410L;
+
+    private long id;
+
+    private String name;
+
+    private List<ReportletConf> reportletConfs;
+
+    private String cronExpression;
+
+    private List<ReportExecTO> executions;
+
+    private String latestExecStatus;
+
+    private Date lastExec;
+
+    private Date nextExec;
+
+    private Date startDate;
+
+    private Date endDate;
+
+    public ReportTO() {
+        super();
+
+        reportletConfs = new ArrayList<ReportletConf>();
+        executions = new ArrayList<ReportExecTO>();
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public boolean addReportletConf(ReportletConf reportlet) {
+        return this.reportletConfs.add(reportlet);
+    }
+
+    public boolean removeReportletConf(ReportletConf reportlet) {
+        return this.reportletConfs.remove(reportlet);
+    }
+
+    public List<ReportletConf> getReportletConfs() {
+        return reportletConfs;
+    }
+
+    public void setReportletConfs(List<ReportletConf> reportlets) {
+        this.reportletConfs = reportlets;
+    }
+
+    public String getCronExpression() {
+        return cronExpression;
+    }
+
+    public void setCronExpression(String cronExpression) {
+        this.cronExpression = cronExpression;
+    }
+
+    public boolean addExecution(ReportExecTO execution) {
+        return executions.add(execution);
+    }
+
+    public boolean removeExecution(ReportExecTO execution) {
+        return executions.remove(execution);
+    }
+
+    public List<ReportExecTO> getExecutions() {
+        return executions;
+    }
+
+    public void setExecutions(List<ReportExecTO> executions) {
+        this.executions = executions;
+    }
+
+    public String getLatestExecStatus() {
+        return latestExecStatus;
+    }
+
+    public void setLatestExecStatus(String latestExecStatus) {
+        this.latestExecStatus = latestExecStatus;
+    }
+
+    public Date getLastExec() {
+        return lastExec == null
+                ? null
+                : new Date(lastExec.getTime());
+    }
+
+    public void setLastExec(Date lastExec) {
+        if (lastExec != null) {
+            this.lastExec = new Date(lastExec.getTime());
+        }
+    }
+
+    public Date getNextExec() {
+        return nextExec == null
+                ? null
+                : new Date(nextExec.getTime());
+    }
+
+    public void setNextExec(Date nextExec) {
+        if (nextExec != null) {
+            this.nextExec = new Date(nextExec.getTime());
+        }
+    }
+     
+    public Date getStartDate() {
+        return startDate == null
+                ? null
+                : new Date(startDate.getTime());
+    }
+
+    public void setStartDate(Date startDate) {
+        if (startDate != null) {
+            this.startDate = new Date(startDate.getTime());
+        }
+    }
+
+    public Date getEndDate() {
+        return endDate == null
+                ? null
+                : new Date(endDate.getTime());
+    }
+
+    public void setEndDate(Date endDate) {
+        if (endDate != null) {
+            this.endDate = new Date(endDate.getTime());
+        }
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,241 @@
+/*
+ * 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 java.util.HashSet;
+import java.util.Set;
+
+import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.ConnConfProperty;
+import org.apache.syncope.common.types.PropagationMode;
+import org.apache.syncope.common.types.TraceLevel;
+
+public class ResourceTO extends AbstractBaseBean {
+
+    private static final long serialVersionUID = -9193551354041698963L;
+
+    /**
+     * The resource identifier is the name.
+     */
+    private String name;
+
+    /**
+     * The resource type is identified by the associated connector.
+     */
+    private Long connectorId;
+
+    private MappingTO umapping;
+
+    private MappingTO rmapping;
+
+    private boolean propagationPrimary;
+
+    private int propagationPriority;
+
+    private PropagationMode propagationMode;
+
+    private boolean enforceMandatoryCondition;
+
+    private TraceLevel createTraceLevel;
+
+    private TraceLevel updateTraceLevel;
+
+    private TraceLevel deleteTraceLevel;
+
+    private TraceLevel syncTraceLevel;
+
+    private Long passwordPolicy;
+
+    private Long accountPolicy;
+
+    private Long syncPolicy;
+
+    private Set<ConnConfProperty> connConfProperties;
+
+    private String usyncToken;
+
+    private String rsyncToken;
+
+    private String propagationActionsClassName;
+
+    public ResourceTO() {
+        super();
+
+        connConfProperties = new HashSet<ConnConfProperty>();
+        propagationMode = PropagationMode.TWO_PHASES;
+        propagationPriority = 0;
+
+        createTraceLevel = TraceLevel.ALL;
+        updateTraceLevel = TraceLevel.ALL;
+        deleteTraceLevel = TraceLevel.ALL;
+        syncTraceLevel = TraceLevel.ALL;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public boolean isEnforceMandatoryCondition() {
+        return enforceMandatoryCondition;
+    }
+
+    public void setEnforceMandatoryCondition(boolean enforceMandatoryCondition) {
+        this.enforceMandatoryCondition = enforceMandatoryCondition;
+    }
+
+    public Long getConnectorId() {
+        return connectorId;
+    }
+
+    public void setConnectorId(Long connectorId) {
+        this.connectorId = connectorId;
+    }
+
+    public MappingTO getUmapping() {
+        return umapping;
+    }
+
+    public void setUmapping(MappingTO umapping) {
+        this.umapping = umapping;
+    }
+
+    public MappingTO getRmapping() {
+        return rmapping;
+    }
+
+    public void setRmapping(MappingTO rmapping) {
+        this.rmapping = rmapping;
+    }
+
+    public boolean isPropagationPrimary() {
+        return propagationPrimary;
+    }
+
+    public void setPropagationPrimary(boolean propagationPrimary) {
+        this.propagationPrimary = propagationPrimary;
+    }
+
+    public int getPropagationPriority() {
+        return propagationPriority;
+    }
+
+    public void setPropagationPriority(int propagationPriority) {
+        this.propagationPriority = propagationPriority;
+    }
+
+    public PropagationMode getPropagationMode() {
+        return propagationMode;
+    }
+
+    public void setPropagationMode(PropagationMode propagationMode) {
+        this.propagationMode = propagationMode;
+    }
+
+    public TraceLevel getCreateTraceLevel() {
+        return createTraceLevel;
+    }
+
+    public void setCreateTraceLevel(TraceLevel createTraceLevel) {
+        this.createTraceLevel = createTraceLevel;
+    }
+
+    public TraceLevel getDeleteTraceLevel() {
+        return deleteTraceLevel;
+    }
+
+    public void setDeleteTraceLevel(TraceLevel deleteTraceLevel) {
+        this.deleteTraceLevel = deleteTraceLevel;
+    }
+
+    public TraceLevel getUpdateTraceLevel() {
+        return updateTraceLevel;
+    }
+
+    public void setUpdateTraceLevel(TraceLevel updateTraceLevel) {
+        this.updateTraceLevel = updateTraceLevel;
+    }
+
+    public Long getPasswordPolicy() {
+        return passwordPolicy;
+    }
+
+    public void setPasswordPolicy(Long passwordPolicy) {
+        this.passwordPolicy = passwordPolicy;
+    }
+
+    public Long getAccountPolicy() {
+        return accountPolicy;
+    }
+
+    public void setAccountPolicy(Long accountPolicy) {
+        this.accountPolicy = accountPolicy;
+    }
+
+    public Long getSyncPolicy() {
+        return syncPolicy;
+    }
+
+    public void setSyncPolicy(Long syncPolicy) {
+        this.syncPolicy = syncPolicy;
+    }
+
+    public Set<ConnConfProperty> getConnConfProperties() {
+        return connConfProperties;
+    }
+
+    public void setConnectorConfigurationProperties(final Set<ConnConfProperty> connConfProperties) {
+        this.connConfProperties = connConfProperties;
+    }
+
+    public TraceLevel getSyncTraceLevel() {
+        return syncTraceLevel;
+    }
+
+    public void setSyncTraceLevel(final TraceLevel syncTraceLevel) {
+        this.syncTraceLevel = syncTraceLevel;
+    }
+
+    public String getUsyncToken() {
+        return usyncToken;
+    }
+
+    public void setUsyncToken(final String syncToken) {
+        this.usyncToken = syncToken;
+    }
+
+    public String getRsyncToken() {
+        return rsyncToken;
+    }
+
+    public void setRsyncToken(final String syncToken) {
+        this.rsyncToken = syncToken;
+    }
+
+    public String getPropagationActionsClassName() {
+        return propagationActionsClassName;
+    }
+
+    public void setPropagationActionsClassName(final String propagationActionsClassName) {
+        this.propagationActionsClassName = propagationActionsClassName;
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,207 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.List;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+
+@JsonIgnoreProperties({"displayName", "empty"})
+public class RoleTO extends AbstractAttributableTO {
+
+    private static final long serialVersionUID = -7785920258290147542L;
+
+    private String name;
+
+    private long parent;
+
+    private Long userOwner;
+
+    private Long roleOwner;
+
+    private boolean inheritOwner;
+
+    private boolean inheritAttributes;
+
+    private boolean inheritDerivedAttributes;
+
+    private boolean inheritVirtualAttributes;
+
+    private boolean inheritPasswordPolicy;
+
+    private boolean inheritAccountPolicy;
+
+    private List<String> entitlements;
+
+    private Long passwordPolicy;
+
+    private Long accountPolicy;
+
+    public RoleTO() {
+        entitlements = new ArrayList<String>();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public long getParent() {
+        return parent;
+    }
+
+    public void setParent(final long parent) {
+        this.parent = parent;
+    }
+
+    public Long getUserOwner() {
+        return userOwner;
+    }
+
+    public void setUserOwner(final Long userOwner) {
+        this.userOwner = userOwner;
+    }
+
+    public Long getRoleOwner() {
+        return roleOwner;
+    }
+
+    public void setRoleOwner(final Long roleOwner) {
+        this.roleOwner = roleOwner;
+    }
+
+    public boolean isInheritOwner() {
+        return inheritOwner;
+    }
+
+    public void setInheritOwner(final boolean inheritOwner) {
+        this.inheritOwner = inheritOwner;
+    }
+
+    public boolean isInheritAttributes() {
+        return inheritAttributes;
+    }
+
+    public void setInheritAttributes(final boolean inheritAttributes) {
+        this.inheritAttributes = inheritAttributes;
+    }
+
+    public boolean isInheritDerivedAttributes() {
+        return inheritDerivedAttributes;
+    }
+
+    public void setInheritDerivedAttributes(final boolean inheritDerivedAttributes) {
+
+        this.inheritDerivedAttributes = inheritDerivedAttributes;
+    }
+
+    public boolean isInheritVirtualAttributes() {
+        return inheritVirtualAttributes;
+    }
+
+    public void setInheritVirtualAttributes(boolean inheritVirtualAttributes) {
+        this.inheritVirtualAttributes = inheritVirtualAttributes;
+    }
+
+    public boolean addEntitlement(String entitlement) {
+        return entitlements.add(entitlement);
+    }
+
+    public boolean removeEntitlement(String entitlement) {
+        return entitlements.remove(entitlement);
+    }
+
+    public List<String> getEntitlements() {
+        return entitlements;
+    }
+
+    public void setEntitlements(List<String> entitlements) {
+        this.entitlements.clear();
+        if (entitlements != null && !entitlements.isEmpty()) {
+            this.entitlements.addAll(entitlements);
+        }
+    }
+
+    public Long getPasswordPolicy() {
+        return passwordPolicy;
+    }
+
+    public void setPasswordPolicy(Long passwordPolicy) {
+        this.passwordPolicy = passwordPolicy;
+    }
+
+    public boolean isInheritPasswordPolicy() {
+        return inheritPasswordPolicy;
+    }
+
+    /**
+     * Specify if password policy must be inherited. In this case eventual passwordPolicy occurrence will be ignored.
+     *
+     * @param inheritPasswordPolicy 'true' to inherit policy, false otherwise.
+     */
+    public void setInheritPasswordPolicy(boolean inheritPasswordPolicy) {
+        this.inheritPasswordPolicy = inheritPasswordPolicy;
+    }
+
+    public Long getAccountPolicy() {
+        return accountPolicy;
+    }
+
+    public void setAccountPolicy(Long accountPolicy) {
+        this.accountPolicy = accountPolicy;
+    }
+
+    public boolean isInheritAccountPolicy() {
+        return inheritAccountPolicy;
+    }
+
+    /**
+     * Specify if account policy must be inherited. In this case eventual accountPolicy occurrence will be ignored.
+     *
+     * @param inheritAccountPolicy 'true' to inherit policy, false otherwise.
+     */
+    public void setInheritAccountPolicy(boolean inheritAccountPolicy) {
+        this.inheritAccountPolicy = inheritAccountPolicy;
+    }
+
+    public String getDisplayName() {
+        return getId() + " " + getName();
+    }
+
+    public String getEmpty() {
+        return "";
+    }
+
+    public static long fromDisplayName(final String displayName) {
+        long result = 0;
+        if (displayName != null && !displayName.isEmpty() && displayName.indexOf(' ') != -1) {
+            try {
+                result = Long.valueOf(displayName.split(" ")[0]);
+            } catch (NumberFormatException e) {
+                // just to avoid PMD warning about "empty catch block"
+                result = 0;
+            }
+        }
+
+        return result;
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,94 @@
+/*
+ * 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 java.util.Date;
+
+public class SchedTaskTO extends TaskTO {
+
+    private static final long serialVersionUID = -5722284116974636425L;
+
+    private String cronExpression;
+
+    private String jobClassName;
+
+    private String name;
+
+    private String description;
+
+    private Date lastExec;
+
+    private Date nextExec;
+
+    public String getCronExpression() {
+        return cronExpression;
+    }
+
+    public void setCronExpression(String cronExpression) {
+        this.cronExpression = cronExpression;
+    }
+
+    public String getJobClassName() {
+        return jobClassName;
+    }
+
+    public void setJobClassName(String jobClassName) {
+        this.jobClassName = jobClassName;
+    }
+
+    public Date getLastExec() {
+        return lastExec == null
+                ? null
+                : new Date(lastExec.getTime());
+    }
+
+    public void setLastExec(Date lastExec) {
+        if (lastExec != null) {
+            this.lastExec = new Date(lastExec.getTime());
+        }
+    }
+
+    public Date getNextExec() {
+        return nextExec == null
+                ? null
+                : new Date(nextExec.getTime());
+    }
+
+    public void setNextExec(Date nextExec) {
+        if (nextExec != null) {
+            this.nextExec = new Date(nextExec.getTime());
+        }
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,124 @@
+/*
+ * 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.commons.lang.StringUtils;
+import org.apache.syncope.common.types.SchemaType;
+
+@XmlRootElement(name = "schema")
+@XmlType
+public class SchemaTO extends AbstractSchemaTO {
+
+    private static final long serialVersionUID = -8133983392476990308L;
+
+    private SchemaType type = SchemaType.String;
+
+    private String mandatoryCondition;
+
+    private String enumerationValues;
+
+    private String enumerationKeys;
+
+    private boolean multivalue;
+
+    private boolean uniqueConstraint;
+
+    private boolean readonly;
+
+    private String conversionPattern;
+
+    private String validatorClass;
+
+    public String getConversionPattern() {
+        return conversionPattern;
+    }
+
+    public void setConversionPattern(final String conversionPattern) {
+        this.conversionPattern = conversionPattern;
+    }
+
+    public String getMandatoryCondition() {
+        return StringUtils.isNotBlank(mandatoryCondition)
+                ? mandatoryCondition
+                : "false";
+    }
+
+    public void setMandatoryCondition(final String mandatoryCondition) {
+        this.mandatoryCondition = mandatoryCondition;
+    }
+
+    public String getEnumerationValues() {
+        return enumerationValues;
+    }
+
+    public void setEnumerationValues(final String enumerationValues) {
+        this.enumerationValues = enumerationValues;
+    }
+
+    public String getEnumerationKeys() {
+        return enumerationKeys;
+    }
+
+    public void setEnumerationKeys(final String enumerationKeys) {
+        this.enumerationKeys = enumerationKeys;
+    }
+
+    public boolean isMultivalue() {
+        return multivalue;
+    }
+
+    public void setMultivalue(final boolean multivalue) {
+        this.multivalue = multivalue;
+    }
+
+    public boolean isUniqueConstraint() {
+        return uniqueConstraint;
+    }
+
+    public void setUniqueConstraint(final boolean uniqueConstraint) {
+        this.uniqueConstraint = uniqueConstraint;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(final boolean readonly) {
+        this.readonly = readonly;
+    }
+
+    public SchemaType getType() {
+        return type;
+    }
+
+    public void setType(final SchemaType type) {
+        this.type = type;
+    }
+
+    public String getValidatorClass() {
+        return validatorClass;
+    }
+
+    public void setValidatorClass(final String validatorClass) {
+        this.validatorClass = validatorClass;
+    }
+}

Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,49 @@
+/*
+ * 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 org.apache.syncope.common.types.PolicyType;
+import org.apache.syncope.common.types.SyncPolicySpec;
+
+public class SyncPolicyTO extends PolicyTO {
+
+    private static final long serialVersionUID = 993024634238024242L;
+
+    private SyncPolicySpec specification;
+
+    public SyncPolicyTO() {
+        this(false);
+    }
+
+    public SyncPolicyTO(boolean global) {
+        super();
+
+        this.type = global
+                ? PolicyType.GLOBAL_SYNC
+                : PolicyType.SYNC;
+    }
+
+    public void setSpecification(final SyncPolicySpec specification) {
+        this.specification = specification;
+    }
+
+    public SyncPolicySpec getSpecification() {
+        return specification;
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,114 @@
+/*
+ * 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;
+
+public class SyncTaskTO extends SchedTaskTO {
+
+    private static final long serialVersionUID = -2143537546915809016L;
+
+    private String resource;
+
+    private UserTO userTemplate;
+
+    private RoleTO roleTemplate;
+
+    private boolean performCreate;
+
+    private boolean performUpdate;
+
+    private boolean performDelete;
+
+    private boolean syncStatus;
+
+    private boolean fullReconciliation;
+
+    private String actionsClassName;
+
+    public UserTO getUserTemplate() {
+        return userTemplate;
+    }
+
+    public void setUserTemplate(UserTO userTemplate) {
+        this.userTemplate = userTemplate;
+    }
+
+    public RoleTO getRoleTemplate() {
+        return roleTemplate;
+    }
+
+    public void setRoleTemplate(RoleTO roleTemplate) {
+        this.roleTemplate = roleTemplate;
+    }
+
+    public String getResource() {
+        return resource;
+    }
+
+    public void setResource(String resource) {
+        this.resource = resource;
+    }
+
+    public boolean isPerformCreate() {
+        return performCreate;
+    }
+
+    public void setPerformCreate(boolean performCreate) {
+        this.performCreate = performCreate;
+    }
+
+    public boolean isPerformUpdate() {
+        return performUpdate;
+    }
+
+    public void setPerformUpdate(boolean performUpdate) {
+        this.performUpdate = performUpdate;
+    }
+
+    public boolean isPerformDelete() {
+        return performDelete;
+    }
+
+    public void setPerformDelete(boolean performDelete) {
+        this.performDelete = performDelete;
+    }
+
+    public boolean isSyncStatus() {
+        return syncStatus;
+    }
+
+    public void setSyncStatus(boolean syncStatus) {
+        this.syncStatus = syncStatus;
+    }
+
+    public boolean isFullReconciliation() {
+        return fullReconciliation;
+    }
+
+    public void setFullReconciliation(boolean fullReconciliation) {
+        this.fullReconciliation = fullReconciliation;
+    }
+
+    public String getActionsClassName() {
+        return actionsClassName;
+    }
+
+    public void setActionsClassName(String actionsClassName) {
+        this.actionsClassName = actionsClassName;
+    }
+}

Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
+public class TaskExecTO extends AbstractExecTO {
+
+    private static final long serialVersionUID = -5401795154606268973L;
+
+    private long task;
+
+    public long getTask() {
+        return task;
+    }
+
+    public void setTask(long task) {
+        this.task = task;
+    }
+}



Mime
View raw message