You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by jb...@apache.org on 2013/01/21 10:09:04 UTC
svn commit: r1436230 [5/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/...
Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,102 @@
+/*
+ * 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;
+
+public class TaskTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 386450127003321197L;
+
+ private long id;
+
+ private String latestExecStatus;
+
+ private List<TaskExecTO> executions;
+
+ private Date startDate;
+
+ private Date endDate;
+
+ public TaskTO() {
+ super();
+
+ executions = new ArrayList<TaskExecTO>();
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getLatestExecStatus() {
+ return latestExecStatus;
+ }
+
+ public void setLatestExecStatus(String latestExecStatus) {
+ this.latestExecStatus = latestExecStatus;
+ }
+
+ public boolean addExecution(TaskExecTO execution) {
+ return executions.add(execution);
+ }
+
+ public boolean removeExecution(TaskExecTO execution) {
+ return executions.remove(execution);
+ }
+
+ public List<TaskExecTO> getExecutions() {
+ return executions;
+ }
+
+ public void setExecutions(List<TaskExecTO> executions) {
+ this.executions = executions;
+ }
+
+ 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/UserRequestTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserRequestTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,84 @@
+/*
+ * 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.mod.UserMod;
+import org.apache.syncope.common.types.UserRequestType;
+
+public class UserRequestTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 1228351243795629329L;
+
+ private long id;
+
+ private UserTO userTO;
+
+ private UserMod userMod;
+
+ private Long userId;
+
+ private UserRequestType type;
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public UserRequestType getType() {
+ return type;
+ }
+
+ public void setType(UserRequestType type) {
+ this.type = type;
+ }
+
+ public UserTO getUserTO() {
+ return type != UserRequestType.CREATE
+ ? null
+ : userTO;
+ }
+
+ public void setUserTO(UserTO userTO) {
+ this.userTO = userTO;
+ }
+
+ public UserMod getUserMod() {
+ return type != UserRequestType.UPDATE
+ ? null
+ : userMod;
+ }
+
+ public void setUserMod(UserMod userMod) {
+ this.userMod = userMod;
+ }
+
+ public Long getUserId() {
+ return type != UserRequestType.DELETE
+ ? null
+ : userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+}
Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,181 @@
+/*
+ * 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.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+public class UserTO extends AbstractAttributableTO {
+
+ private static final long serialVersionUID = 7791304495192615740L;
+
+ private String password;
+
+ private List<MembershipTO> memberships;
+
+ private String status;
+
+ private String token;
+
+ private Date tokenExpireTime;
+
+ private String username;
+
+ private Date lastLoginDate;
+
+ private Date creationDate;
+
+ private Date changePwdDate;
+
+ private Integer failedLogins;
+
+ public UserTO() {
+ super();
+
+ memberships = new ArrayList<MembershipTO>();
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public boolean addMembership(MembershipTO membershipTO) {
+ return memberships.add(membershipTO);
+ }
+
+ public boolean removeMembership(MembershipTO membershipTO) {
+ return memberships.remove(membershipTO);
+ }
+
+ public List<MembershipTO> getMemberships() {
+ return memberships;
+ }
+
+ public void setMemberships(List<MembershipTO> memberships) {
+ this.memberships = memberships;
+ }
+
+ @JsonIgnore
+ public Map<Long, MembershipTO> getMembershipMap() {
+ Map<Long, MembershipTO> result;
+
+ if (getMemberships() == null) {
+ result = Collections.emptyMap();
+ } else {
+ result = new HashMap<Long, MembershipTO>(getMemberships().size());
+ for (MembershipTO membership : getMemberships()) {
+ result.put(membership.getRoleId(), membership);
+ }
+ result = Collections.unmodifiableMap(result);
+ }
+
+ return result;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public Date getTokenExpireTime() {
+ return tokenExpireTime == null
+ ? null
+ : new Date(tokenExpireTime.getTime());
+ }
+
+ public void setTokenExpireTime(Date tokenExpireTime) {
+ if (tokenExpireTime != null) {
+ this.tokenExpireTime = new Date(tokenExpireTime.getTime());
+ }
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public Date getChangePwdDate() {
+ return changePwdDate;
+ }
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ public Integer getFailedLogins() {
+ return failedLogins;
+ }
+
+ public Date getLastLoginDate() {
+ return lastLoginDate;
+ }
+
+ public void setChangePwdDate(Date changePwdDate) {
+ this.changePwdDate = changePwdDate;
+ }
+
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public void setFailedLogins(Integer failedLogins) {
+ this.failedLogins = failedLogins;
+ }
+
+ public void setLastLoginDate(Date lastLoginDate) {
+ this.lastLoginDate = lastLoginDate;
+ }
+
+ @Override
+ public String toString() {
+ return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) {
+
+ @Override
+ protected boolean accept(Field f) {
+ return super.accept(f) && !f.getName().equals("password");
+ }
+ }.toString();
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ValidatorTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ValidatorTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ValidatorTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ValidatorTO.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
+@XmlType
+public class ValidatorTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 7233619557177034453L;
+
+ private String name;
+
+ public static ValidatorTO instance(final String name) {
+ ValidatorTO instance = new ValidatorTO();
+ 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/VirtualSchemaTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,25 @@
+/*
+ * 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 VirtualSchemaTO extends AbstractSchemaTO {
+
+ private static final long serialVersionUID = -8198557479659701343L;
+
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowDefinitionTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,46 @@
+/*
+ * 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;
+
+public class WorkflowDefinitionTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 8803733012885686826L;
+
+ private String id;
+
+ private String xmlDefinition;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getXmlDefinition() {
+ return xmlDefinition;
+ }
+
+ public void setXmlDefinition(String xmlDefinition) {
+ this.xmlDefinition = xmlDefinition;
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,134 @@
+/*
+ * 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.HashMap;
+import java.util.Map;
+
+import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.WorkflowFormPropertyType;
+
+public class WorkflowFormPropertyTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 9139969592634304261L;
+
+ private String id;
+
+ private String name;
+
+ private WorkflowFormPropertyType type;
+
+ private String value;
+
+ private boolean readable;
+
+ private boolean writable;
+
+ private boolean required;
+
+ private String datePattern;
+
+ private Map<String, String> enumValues;
+
+ public WorkflowFormPropertyTO() {
+ enumValues = new HashMap<String, String>();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean isReadable() {
+ return readable;
+ }
+
+ public void setReadable(boolean readable) {
+ this.readable = readable;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public WorkflowFormPropertyType getType() {
+ return type;
+ }
+
+ public void setType(WorkflowFormPropertyType type) {
+ this.type = type;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public boolean isWritable() {
+ return writable;
+ }
+
+ public void setWritable(boolean writable) {
+ this.writable = writable;
+ }
+
+ public String getDatePattern() {
+ return datePattern;
+ }
+
+ public void setDatePattern(String datePattern) {
+ this.datePattern = datePattern;
+ }
+
+ public Map<String, String> getEnumValues() {
+ return enumValues;
+ }
+
+ public void putEnumValue(String key, String value) {
+ this.enumValues.put(key, value);
+ }
+
+ public void removeEnumValue(String key) {
+ this.enumValues.remove(key);
+ }
+
+ public void setEnumValues(Map<String, String> enumValues) {
+ if (enumValues != null) {
+ this.enumValues = enumValues;
+ }
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,151 @@
+/*
+ * 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.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.apache.syncope.common.AbstractBaseBean;
+
+public class WorkflowFormTO extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -7044543391316529128L;
+
+ private String taskId;
+
+ private String key;
+
+ private String description;
+
+ private Date createTime;
+
+ private Date dueDate;
+
+ private String owner;
+
+ private List<WorkflowFormPropertyTO> properties;
+
+ public WorkflowFormTO() {
+ properties = new ArrayList<WorkflowFormPropertyTO>();
+ }
+
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Date getDueDate() {
+ return dueDate;
+ }
+
+ public void setDueDate(Date dueDate) {
+ this.dueDate = dueDate;
+ }
+
+ public String getOwner() {
+ return owner;
+ }
+
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+
+ public List<WorkflowFormPropertyTO> getProperties() {
+ return properties;
+ }
+
+ public boolean addProperty(final WorkflowFormPropertyTO property) {
+ return properties.contains(property)
+ ? true
+ : properties.add(property);
+ }
+
+ public boolean removeProperty(final WorkflowFormPropertyTO property) {
+ return properties.remove(property);
+ }
+
+ public void setProperties(final Collection<WorkflowFormPropertyTO> properties) {
+
+ this.properties.clear();
+ if (properties != null) {
+ this.properties.addAll(properties);
+ }
+ }
+
+ @JsonIgnore
+ public Map<String, WorkflowFormPropertyTO> getPropertyMap() {
+ Map<String, WorkflowFormPropertyTO> result;
+
+ if (getProperties() == null) {
+ result = Collections.emptyMap();
+ } else {
+ result = new HashMap<String, WorkflowFormPropertyTO>();
+ for (WorkflowFormPropertyTO prop : getProperties()) {
+ result.put(prop.getId(), prop);
+ }
+ result = Collections.unmodifiableMap(result);
+ }
+
+ return result;
+ }
+
+ @JsonIgnore
+ public Map<String, String> getPropertiesForSubmit() {
+ Map<String, String> props = new HashMap<String, String>();
+ for (WorkflowFormPropertyTO prop : getProperties()) {
+ if (prop.isWritable()) {
+ props.put(prop.getId(), prop.getValue());
+ }
+ }
+
+ return props;
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,29 @@
+/*
+ * 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 org.apache.syncope.common.AbstractBaseBean;
+
+public class AbstractPolicySpec extends AbstractBaseBean {
+
+ private static final long serialVersionUID = 2740439904103716653L;
+
+ public AbstractPolicySpec() {
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,176 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.List;
+
+import org.apache.syncope.common.annotation.SchemaList;
+
+public class AccountPolicySpec extends AbstractPolicySpec {
+
+ private static final long serialVersionUID = 3259256974414758406L;
+
+ /**
+ * Minimum length.
+ */
+ private int maxLength;
+
+ /**
+ * Maximum length.
+ */
+ private int minLength;
+
+ /**
+ * Substrings not permitted.
+ */
+ private List<String> wordsNotPermitted;
+
+ /**
+ * User attribute values not permitted.
+ */
+ @SchemaList
+ private List<String> schemasNotPermitted;
+
+ /**
+ * Substrings not permitted as prefix.
+ */
+ private List<String> prefixesNotPermitted;
+
+ /**
+ * Substrings not permitted as suffix.
+ */
+ private List<String> suffixesNotPermitted;
+
+ /**
+ * Specify if one or more lowercase characters are permitted.
+ */
+ private boolean allUpperCase;
+
+ /**
+ * Specify if one or more uppercase characters are permitted.
+ */
+ private boolean allLowerCase;
+
+ /**
+ * Specify if it must be propagate suspension in case of maximum subsequent
+ * failed logins reached.
+ */
+ private boolean propagateSuspension;
+
+ /**
+ * Number of permitted login retries.
+ * 0 disabled; >0 enabled.
+ * If the number of subsequent failed logins will be greater then this value
+ * the account will be suspended (lock-out).
+ */
+ private int permittedLoginRetries;
+
+ public boolean isAllLowerCase() {
+ return allLowerCase;
+ }
+
+ public void setAllLowerCase(boolean allLowerCase) {
+ this.allLowerCase = allLowerCase;
+ }
+
+ public boolean isAllUpperCase() {
+ return allUpperCase;
+ }
+
+ public void setAllUpperCase(boolean allUpperCase) {
+ this.allUpperCase = allUpperCase;
+ }
+
+ public int getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(int maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public int getMinLength() {
+ return minLength;
+ }
+
+ public void setMinLength(int minLength) {
+ this.minLength = minLength;
+ }
+
+ public List<String> getPrefixesNotPermitted() {
+ if (prefixesNotPermitted == null) {
+ prefixesNotPermitted = new ArrayList<String>();
+ }
+ return prefixesNotPermitted;
+ }
+
+ public void setPrefixesNotPermitted(List<String> prefixesNotPermitted) {
+ this.prefixesNotPermitted = prefixesNotPermitted;
+ }
+
+ public List<String> getSchemasNotPermitted() {
+ if (schemasNotPermitted == null) {
+ schemasNotPermitted = new ArrayList<String>();
+ }
+ return schemasNotPermitted;
+ }
+
+ public void setSchemasNotPermitted(List<String> schemasNotPermitted) {
+ this.schemasNotPermitted = schemasNotPermitted;
+ }
+
+ public List<String> getSuffixesNotPermitted() {
+ if (suffixesNotPermitted == null) {
+ suffixesNotPermitted = new ArrayList<String>();
+ }
+ return suffixesNotPermitted;
+ }
+
+ public void setSuffixesNotPermitted(List<String> suffixesNotPermitted) {
+ this.suffixesNotPermitted = suffixesNotPermitted;
+ }
+
+ public List<String> getWordsNotPermitted() {
+ if (wordsNotPermitted == null) {
+ wordsNotPermitted = new ArrayList<String>();
+ }
+ return wordsNotPermitted;
+ }
+
+ public void setWordsNotPermitted(List<String> wordsNotPermitted) {
+ this.wordsNotPermitted = wordsNotPermitted;
+ }
+
+ public boolean isPropagateSuspension() {
+ return propagateSuspension;
+ }
+
+ public void setPropagateSuspension(boolean propagateSuspension) {
+ this.propagateSuspension = propagateSuspension;
+ }
+
+ public int getPermittedLoginRetries() {
+ return permittedLoginRetries;
+ }
+
+ public void setPermittedLoginRetries(int permittedLoginRetries) {
+ this.permittedLoginRetries = permittedLoginRetries;
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AttributableType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AttributableType.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AttributableType.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AttributableType.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,27 @@
+/*
+ * 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;
+
+public enum AttributableType {
+
+ USER,
+ ROLE,
+ MEMBERSHIP;
+
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,244 @@
+/*
+ * 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 java.util.EnumSet;
+
+public final class AuditElements {
+
+ private AuditElements() {
+ }
+
+ public enum Category {
+
+ authentication(AuthenticationSubCategory.class),
+ configuration(ConfigurationSubCategory.class),
+ connector(ConnectorSubCategory.class),
+ logger(LoggerSubCategory.class),
+ notification(NotificationSubCategory.class),
+ policy(PolicySubCategory.class),
+ report(ReportSubCategory.class),
+ resource(ResourceSubCategory.class),
+ role(RoleSubCategory.class),
+ schema(SchemaSubCategory.class),
+ task(TaskSubCategory.class),
+ user(UserSubCategory.class),
+ userRequest(UserRequestSubCategory.class),
+ workflow(WorkflowSubCategory.class);
+
+ private Class<? extends Enum<?>> subCategory;
+
+ Category(final Class<? extends Enum<?>> subCategory) {
+ this.subCategory = subCategory;
+ }
+
+ public Class<? extends Enum> getSubCategory() {
+ return subCategory;
+ }
+
+ public EnumSet<? extends Enum<?>> getSubCategoryElements() {
+ return EnumSet.allOf(getSubCategory());
+ }
+ }
+
+ public enum Result {
+
+ success,
+ failure
+
+ }
+
+ public enum AuthenticationSubCategory {
+
+ login,
+ getEntitlements
+
+ }
+
+ public enum ConfigurationSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ getMailTemplates,
+ getValidators,
+ dbExport
+
+ }
+
+ public enum ConnectorSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ getBundles,
+ getSchemaNames,
+ getConfigurationProperties,
+ check,
+ readConnectorBean
+
+ }
+
+ public enum LoggerSubCategory {
+
+ list,
+ setLevel,
+ delete
+
+ }
+
+ public enum NotificationSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ sent
+
+ }
+
+ public enum PolicySubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete
+
+ }
+
+ public enum ReportSubCategory {
+
+ list,
+ listExecutions,
+ create,
+ read,
+ readExecution,
+ update,
+ delete,
+ deleteExecution,
+ getReportletConfClasses,
+ execute,
+ exportExecutionResult
+
+ }
+
+ public enum ResourceSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ getObject,
+ getRoleResourcesMapping,
+ getPropagationActionsClasses
+
+ }
+
+ public enum RoleSubCategory {
+
+ list,
+ create,
+ read,
+ selfRead,
+ update,
+ delete,
+ parent,
+ children
+
+ }
+
+ public enum SchemaSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ listDerived,
+ createDerived,
+ readDerived,
+ updateDerived,
+ deleteDerived,
+ listVirtual,
+ createVirtual,
+ readVirtual,
+ updateVirtual,
+ deleteVirtual
+
+ }
+
+ public enum TaskSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ listExecutions,
+ getJobClasses,
+ getSyncActionsClasses,
+ readExecution,
+ execute,
+ report,
+ deleteExecution
+
+ }
+
+ public enum UserSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ verifyPassword,
+ search,
+ setStatus,
+ executeWorkflow,
+ getForms,
+ getFormForUser,
+ claimForm,
+ submitForm
+
+ }
+
+ public enum UserRequestSubCategory {
+
+ list,
+ create,
+ read,
+ update,
+ delete,
+ isCreateAllowed,}
+
+ public enum WorkflowSubCategory {
+
+ getDefinition,
+ updateDefinition,
+ getDefinedTasks
+
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,100 @@
+/*
+ * 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 java.text.ParseException;
+import org.apache.commons.lang.StringUtils;
+import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.types.AuditElements.Category;
+import org.apache.syncope.common.types.AuditElements.Result;
+import org.codehaus.jackson.annotate.JsonCreator;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.annotate.JsonTypeInfo;
+
+public class AuditLoggerName extends AbstractBaseBean {
+
+ private static final long serialVersionUID = -647989486671786839L;
+
+ private final Category category;
+
+ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+ private final Enum<?> subcategory;
+
+ private final Result result;
+
+ @JsonCreator
+ public AuditLoggerName(@JsonProperty("category") final Category category,
+ @JsonProperty("subcategory") final Enum<?> subcategory, @JsonProperty("result") final Result result)
+ throws IllegalArgumentException {
+
+ if (category == null || subcategory == null || result == null) {
+ throw new IllegalArgumentException("Null values not permitted");
+ }
+
+ if (!category.getSubCategoryElements().contains(subcategory)) {
+ throw new IllegalArgumentException(category.name() + " does not contain " + subcategory.name());
+ }
+
+ this.category = category;
+ this.subcategory = subcategory;
+ this.result = result;
+ }
+
+ public Category getCategory() {
+ return category;
+ }
+
+ public Result getResult() {
+ return result;
+ }
+
+ public Enum<?> getSubcategory() {
+ return subcategory;
+ }
+
+ public String toLoggerName() {
+ return new StringBuilder().append(SyncopeLoggerType.AUDIT.getPrefix()).append('.').
+ append(category.name()).append('.').
+ append(subcategory.name()).append('.').
+ append(result.name()).toString();
+ }
+
+ public static AuditLoggerName fromLoggerName(final String loggerName)
+ throws IllegalArgumentException, ParseException {
+
+ if (StringUtils.isBlank(loggerName)) {
+ throw new IllegalArgumentException("Null value not permitted");
+ }
+
+ if (!loggerName.startsWith(SyncopeLoggerType.AUDIT.getPrefix())) {
+ throw new ParseException("Audit logger name must start with " + SyncopeLoggerType.AUDIT.getPrefix(), 0);
+ }
+
+ String[] splitted = loggerName.split("\\.");
+ if (splitted == null || splitted.length < 5) {
+ throw new ParseException("Unparsable logger name", 0);
+ }
+
+ Category category = Category.valueOf(splitted[2]);
+ Enum<?> subcategory = Enum.valueOf(category.getSubCategory(), splitted[3]);
+ Result result = Result.valueOf(splitted[4]);
+
+ return new AuditLoggerName(category, subcategory, result);
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.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.types;
+
+public enum CipherAlgorithm {
+
+ SHA1("SHA-1"),
+ SHA256("SHA-256"),
+ AES("AES"),
+ SMD5("S-MD5"),
+ SSHA1("S-SHA-1"),
+ SSHA256("S-SHA-256"),
+ BCRYPT("BCRYPT");
+
+ final private String algorithm;
+
+ CipherAlgorithm(String algorithm) {
+ this.algorithm = algorithm;
+ }
+
+ public final String getAlgorithm() {
+ return algorithm;
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+public enum ConflictResolutionAction {
+
+ // sync first matcgh
+ FIRSTMATCH,
+ // sync last match
+ LASTMATCH,
+ // ignore sync
+ IGNORE,
+ // sync all
+ ALL
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,112 @@
+/*
+ * 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.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.syncope.common.AbstractBaseBean;
+
+@XmlRootElement
+@XmlType
+public class ConnConfPropSchema extends AbstractBaseBean implements Comparable<ConnConfPropSchema> {
+
+ private static final long serialVersionUID = -1976365781005801296L;
+
+ private String name;
+
+ private String displayName;
+
+ private String helpMessage;
+
+ private String type;
+
+ private boolean required;
+
+ private int order;
+
+ private boolean confidential;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(final boolean required) {
+ this.required = required;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(final String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getHelpMessage() {
+ return helpMessage;
+ }
+
+ public void setHelpMessage(final String helpMessage) {
+ this.helpMessage = helpMessage;
+ }
+
+ public int getOrder() {
+ return order;
+ }
+
+ public void setOrder(final int order) {
+ this.order = order;
+ }
+
+ public boolean isConfidential() {
+ return confidential;
+ }
+
+ public void setConfidential(final boolean confidential) {
+ this.confidential = confidential;
+ }
+
+ @Override
+ public int compareTo(final ConnConfPropSchema connConfPropSchema) {
+ if (this.getOrder() > connConfPropSchema.getOrder()) {
+ return 1;
+ } else if (this.getOrder() < connConfPropSchema.getOrder()) {
+ return -1;
+ } else {
+ return 0;
+ }
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,73 @@
+/*
+ * 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 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
+@XmlType
+public class ConnConfProperty extends AbstractBaseBean implements Comparable<ConnConfProperty> {
+
+ private static final long serialVersionUID = -8391413960221862238L;
+
+ private ConnConfPropSchema schema;
+
+ private List<?> values = new ArrayList<Object>();
+
+ private boolean overridable;
+
+ public ConnConfPropSchema getSchema() {
+ return schema;
+ }
+
+ public void setSchema(final ConnConfPropSchema schema) {
+ this.schema = schema;
+ }
+
+ @XmlElementWrapper(name = "values")
+ @XmlElement(name = "value")
+ public List<?> getValues() {
+ return values;
+ }
+
+ public void setValues(final List<?> values) {
+ this.values = values;
+ }
+
+ public boolean isOverridable() {
+ return overridable;
+ }
+
+ public void setOverridable(final boolean overridable) {
+ this.overridable = overridable;
+ }
+
+ @Override
+ public int compareTo(final ConnConfProperty connConfProperty) {
+ return this.getSchema().compareTo(connConfProperty.getSchema());
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,37 @@
+/*
+ * 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;
+
+public enum ConnParameterType {
+
+ /**
+ * Connector parameter type:
+ */
+ OVERRIDABLE(true),
+ NOT_OVERRIDABLE(false);
+ private boolean overridable;
+
+ ConnParameterType(final boolean overridable) {
+ this.overridable = overridable;
+ }
+
+ public boolean getOverridable() {
+ return overridable;
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.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.types;
+
+/**
+ * Enum of all possible capabilities that a connector instance can expose.
+ */
+public enum ConnectorCapability {
+
+ ONE_PHASE_CREATE,
+ TWO_PHASES_CREATE,
+ ONE_PHASE_UPDATE,
+ TWO_PHASES_UPDATE,
+ ONE_PHASE_DELETE,
+ TWO_PHASES_DELETE,
+ SEARCH,
+ SYNC
+
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,69 @@
+/*
+ * 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;
+
+public enum EntityViolationType {
+
+ Standard(""),
+ InvalidAccountPolicy("org.apache.syncope.core.validation.accountpolicy"),
+ InvalidEntitlementName("org.apache.syncope.core.validation.entitlement.name"),
+ InvalidMapping("org.apache.syncope.core.validation.mapping"),
+ InvalidMSchema("org.apache.syncope.core.validation.attrvalue.mSchema"),
+ InvalidMDerSchema("org.apache.syncope.core.validation.attrvalue.mDerSchema"),
+ InvalidMVirSchema("org.apache.syncope.core.validation.attrvalue.mVirSchema"),
+ InvalidNotification("org.apache.syncope.core.validation.notification"),
+ InvalidPassword("org.apache.syncope.core.validation.syncopeuser.password"),
+ InvalidPasswordPolicy("org.apache.syncope.core.validation.passwordpolicy"),
+ InvalidPolicy("org.apache.syncope.core.validation.policy"),
+ InvalidPropagationTask("org.apache.syncope.core.validation.propagationtask"),
+ InvalidRSchema("org.apache.syncope.core.validation.attrvalue.rSchema"),
+ InvalidRDerSchema("org.apache.syncope.core.validation.attrvalue.rDerSchema"),
+ InvalidRVirSchema("org.apache.syncope.core.validation.attrvalue.rVirSchema"),
+ InvalidReport("org.apache.syncope.core.validation.report"),
+ InvalidResource("org.apache.syncope.core.validation.externalresource"),
+ InvalidRoleOwner("org.apache.syncope.core.validation.syncoperole.owner"),
+ InvalidSchemaTypeSpecification("org.apache.syncope.core.validation.attrvalue.schemaTypeSpecification"),
+ InvalidSchedTask("org.apache.syncope.core.validation.schedtask"),
+ InvalidSyncTask("org.apache.syncope.core.validation.synctask"),
+ InvalidSyncPolicy("org.apache.syncope.core.validation.syncpolicy"),
+ InvalidUSchema("org.apache.syncope.core.validation.attrvalue.uSchema"),
+ InvalidUDerSchema("org.apache.syncope.core.validation.attrvalue.derSchema"),
+ InvalidUVirSchema("org.apache.syncope.core.validation.attrvalue.uVirSchema"),
+ InvalidUsername("org.apache.syncope.core.validation.syncopeuser.username"),
+ InvalidValueList("org.apache.syncope.core.validation.attr.valueList"),
+ MultivalueAndUniqueConstraint("org.apache.syncope.core.validation.schema.multivalueAndUniqueConstraint"),
+ MoreThanOneNonNull("org.apache.syncope.core.validation.attrvalue.moreThanOneNonNull");
+
+ private String message;
+
+ private EntityViolationType(final String message) {
+ this.message = message;
+ }
+
+ public void setMessageTemplate(final String message) {
+ this.message = message;
+ }
+
+ @Override
+ public String toString() {
+ return this == Standard
+ ? message
+ : super.toString();
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,193 @@
+/*
+ * 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 java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Internal attribute mapping type.
+ */
+public enum IntMappingType {
+
+ // Unfortunately enum type cannot be extended ...
+ // -------------------------
+ // User attribute types (the same in UserMappingType)
+ // -------------------------
+ UserSchema(AttributableType.USER),
+ UserDerivedSchema(AttributableType.USER),
+ UserVirtualSchema(AttributableType.USER),
+ UserId(AttributableType.USER),
+ Username(AttributableType.USER),
+ Password(AttributableType.USER),
+ // -------------------------
+ // Role attribute types (the same in RoleMappingType)
+ // -------------------------
+ RoleSchema(AttributableType.ROLE),
+ RoleDerivedSchema(AttributableType.ROLE),
+ RoleVirtualSchema(AttributableType.ROLE),
+ RoleId(AttributableType.ROLE),
+ RoleName(AttributableType.ROLE),
+ // -------------------------
+ // Membership attribute types (the same in MembershipMappingType)
+ // -------------------------
+ MembershipSchema(AttributableType.MEMBERSHIP),
+ MembershipDerivedSchema(AttributableType.MEMBERSHIP),
+ MembershipVirtualSchema(AttributableType.MEMBERSHIP),
+ MembershipId(AttributableType.MEMBERSHIP);
+
+ private AttributableType attributableType;
+
+ private IntMappingType(final AttributableType attributableType) {
+ this.attributableType = attributableType;
+ }
+
+ public AttributableType getAttributableType() {
+ return attributableType;
+ }
+
+ /**
+ * Get attribute types for a certain attributable type.
+ *
+ * @param attributableType attributable type
+ * @param toBeFiltered types to be filtered from the result.
+ * @return set of attribute types.
+ */
+ public static Set<IntMappingType> getAttributeTypes(
+ final AttributableType attributableType, final Set<IntMappingType> toBeFiltered) {
+
+ final Set<IntMappingType> res = getAttributeTypes(attributableType);
+ res.removeAll(toBeFiltered);
+
+ return res;
+ }
+
+ /**
+ * Get attribute types for a certain attributable type.
+ *
+ * @param attributableType attributable type
+ * @return set of attribute types.
+ */
+ public static Set<IntMappingType> getAttributeTypes(final AttributableType attributableType) {
+ final EnumSet<?> enumset;
+
+ switch (attributableType) {
+ case ROLE:
+ enumset = EnumSet.allOf(RoleMappingType.class);
+ break;
+ case MEMBERSHIP:
+ enumset = EnumSet.allOf(MembershipMappingType.class);
+ break;
+ default:
+ enumset = EnumSet.allOf(UserMappingType.class);
+ }
+
+ final Set<IntMappingType> res = new HashSet<IntMappingType>();
+
+ for (Object obj : enumset) {
+ res.add(IntMappingType.valueOf(obj.toString()));
+ }
+
+ return res;
+ }
+
+ public static Set<IntMappingType> getEmbedded() {
+ return EnumSet.of(
+ IntMappingType.UserId, IntMappingType.Username, IntMappingType.Password,
+ IntMappingType.RoleId, IntMappingType.RoleName,
+ IntMappingType.MembershipId);
+ }
+
+ /**
+ * Check if attribute type belongs to the specified attributable type set.
+ *
+ * @param attributableType attributable type.
+ * @param type attribute type.
+ * @return true if attribute type belongs to the specified attributable type set.
+ */
+ public static boolean contains(final AttributableType attributableType, final String type) {
+ switch (attributableType) {
+ case ROLE:
+ for (RoleMappingType c : RoleMappingType.values()) {
+ if (c.name().equals(type)) {
+ return true;
+ }
+ }
+ break;
+
+ case MEMBERSHIP:
+ for (MembershipMappingType c : MembershipMappingType.values()) {
+ if (c.name().equals(type)) {
+ return true;
+ }
+ }
+ break;
+
+ case USER:
+ default:
+ for (UserMappingType c : UserMappingType.values()) {
+ if (c.name().equals(type)) {
+ return true;
+ }
+ }
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * User attribute types.
+ */
+ private enum UserMappingType {
+
+ UserSchema,
+ UserDerivedSchema,
+ UserVirtualSchema,
+ UserId,
+ Username,
+ Password;
+
+ }
+
+ /**
+ * Role attribute types.
+ */
+ private enum RoleMappingType {
+
+ RoleSchema,
+ RoleDerivedSchema,
+ RoleVirtualSchema,
+ RoleId,
+ RoleName;
+
+ }
+
+ /**
+ * Membership attribute types.
+ */
+ private enum MembershipMappingType {
+
+ MembershipSchema,
+ MembershipDerivedSchema,
+ MembershipVirtualSchema,
+ MembershipId;
+
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,354 @@
+/*
+ * 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 java.util.ArrayList;
+import java.util.List;
+
+import org.apache.syncope.common.annotation.SchemaList;
+
+public class PasswordPolicySpec extends AbstractPolicySpec {
+
+ private static final long serialVersionUID = -7988778083915548547L;
+
+ /**
+ * History length.
+ */
+ private int historyLength;
+
+ /**
+ * Minimum length.
+ */
+ private int maxLength;
+
+ /**
+ * Maximum length.
+ */
+ private int minLength;
+
+ /**
+ * Substrings not permitted.
+ */
+ private List<String> wordsNotPermitted;
+
+ /**
+ * User attribute values not permitted.
+ */
+ @SchemaList
+ private List<String> schemasNotPermitted;
+
+ /**
+ * Specify if one or more non alphanumeric characters are required.
+ */
+ private boolean nonAlphanumericRequired;
+
+ /**
+ * Specify if one or more alphanumeric characters are required.
+ */
+ private boolean alphanumericRequired;
+
+ /**
+ * Specify if one or more digits are required.
+ */
+ private boolean digitRequired;
+
+ /**
+ * Specify if one or more lowercase alphabetic characters are required.
+ */
+ private boolean lowercaseRequired;
+
+ /**
+ * Specify if one or more uppercase alphabetic characters are required.
+ */
+ private boolean uppercaseRequired;
+
+ /**
+ * Specify if must start with a digit.
+ */
+ private boolean mustStartWithDigit;
+
+ /**
+ * Specify if mustn't start with a digit.
+ */
+ private boolean mustntStartWithDigit;
+
+ /**
+ * Specify if must end with a digit.
+ */
+ private boolean mustEndWithDigit;
+
+ /**
+ * Specify if mustn't end with a digit.
+ */
+ private boolean mustntEndWithDigit;
+
+ /**
+ * Specify if must start with a non alphanumeric character.
+ */
+ private boolean mustStartWithNonAlpha;
+
+ /**
+ * Specify if must start with a alphanumeric character.
+ */
+ private boolean mustStartWithAlpha;
+
+ /**
+ * Specify if mustn't start with a non alphanumeric character.
+ */
+ private boolean mustntStartWithNonAlpha;
+
+ /**
+ * Specify if mustn't start with a alphanumeric character.
+ */
+ private boolean mustntStartWithAlpha;
+
+ /**
+ * Specify if must end with a non alphanumeric character.
+ */
+ private boolean mustEndWithNonAlpha;
+
+ /**
+ * Specify if must end with a alphanumeric character.
+ */
+ private boolean mustEndWithAlpha;
+
+ /**
+ * Specify if mustn't end with a non alphanumeric character.
+ */
+ private boolean mustntEndWithNonAlpha;
+
+ /**
+ * Specify if mustn't end with a alphanumeric character.
+ */
+ private boolean mustntEndWithAlpha;
+
+ /**
+ * Substrings not permitted as prefix.
+ */
+ private List<String> prefixesNotPermitted;
+
+ /**
+ * Substrings not permitted as suffix.
+ */
+ private List<String> suffixesNotPermitted;
+
+ public boolean isDigitRequired() {
+ return digitRequired;
+ }
+
+ public void setDigitRequired(boolean digitRequired) {
+ this.digitRequired = digitRequired;
+ }
+
+ public boolean isLowercaseRequired() {
+ return lowercaseRequired;
+ }
+
+ public void setLowercaseRequired(boolean lowercaseRequired) {
+ this.lowercaseRequired = lowercaseRequired;
+ }
+
+ public int getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(int maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public int getMinLength() {
+ return minLength;
+ }
+
+ public void setMinLength(int minLength) {
+ this.minLength = minLength;
+ }
+
+ public boolean isMustEndWithDigit() {
+ return mustEndWithDigit;
+ }
+
+ public void setMustEndWithDigit(boolean mustEndWithDigit) {
+ this.mustEndWithDigit = mustEndWithDigit;
+ }
+
+ public boolean isMustEndWithNonAlpha() {
+ return mustEndWithNonAlpha;
+ }
+
+ public void setMustEndWithNonAlpha(boolean mustEndWithNonAlpha) {
+ this.mustEndWithNonAlpha = mustEndWithNonAlpha;
+ }
+
+ public boolean isMustStartWithDigit() {
+ return mustStartWithDigit;
+ }
+
+ public void setMustStartWithDigit(boolean mustStartWithDigit) {
+ this.mustStartWithDigit = mustStartWithDigit;
+ }
+
+ public boolean isMustStartWithNonAlpha() {
+ return mustStartWithNonAlpha;
+ }
+
+ public void setMustStartWithNonAlpha(boolean mustStartWithNonAlpha) {
+ this.mustStartWithNonAlpha = mustStartWithNonAlpha;
+ }
+
+ public boolean isMustntEndWithDigit() {
+ return mustntEndWithDigit;
+ }
+
+ public void setMustntEndWithDigit(boolean mustntEndWithDigit) {
+ this.mustntEndWithDigit = mustntEndWithDigit;
+ }
+
+ public boolean isMustntEndWithNonAlpha() {
+ return mustntEndWithNonAlpha;
+ }
+
+ public void setMustntEndWithNonAlpha(boolean mustntEndWithNonAlpha) {
+ this.mustntEndWithNonAlpha = mustntEndWithNonAlpha;
+ }
+
+ public boolean isMustntStartWithDigit() {
+ return mustntStartWithDigit;
+ }
+
+ public void setMustntStartWithDigit(boolean mustntStartWithDigit) {
+ this.mustntStartWithDigit = mustntStartWithDigit;
+ }
+
+ public boolean isMustntStartWithNonAlpha() {
+ return mustntStartWithNonAlpha;
+ }
+
+ public void setMustntStartWithNonAlpha(boolean mustntStartWithNonAlpha) {
+ this.mustntStartWithNonAlpha = mustntStartWithNonAlpha;
+ }
+
+ public boolean isNonAlphanumericRequired() {
+ return nonAlphanumericRequired;
+ }
+
+ public void setNonAlphanumericRequired(boolean nonAlphanumericRequired) {
+ this.nonAlphanumericRequired = nonAlphanumericRequired;
+ }
+
+ public List<String> getPrefixesNotPermitted() {
+ if (prefixesNotPermitted == null) {
+ prefixesNotPermitted = new ArrayList<String>();
+ }
+ return prefixesNotPermitted;
+ }
+
+ public void setPrefixesNotPermitted(List<String> prefixesNotPermitted) {
+ this.prefixesNotPermitted = prefixesNotPermitted;
+ }
+
+ public List<String> getSchemasNotPermitted() {
+ if (schemasNotPermitted == null) {
+ schemasNotPermitted = new ArrayList<String>();
+ }
+ return schemasNotPermitted;
+ }
+
+ public void setSchemasNotPermitted(List<String> schemasNotPermitted) {
+ this.schemasNotPermitted = schemasNotPermitted;
+ }
+
+ public List<String> getSuffixesNotPermitted() {
+ if (suffixesNotPermitted == null) {
+ suffixesNotPermitted = new ArrayList<String>();
+ }
+ return suffixesNotPermitted;
+ }
+
+ public void setSuffixesNotPermitted(List<String> suffixesNotPermitted) {
+ this.suffixesNotPermitted = suffixesNotPermitted;
+ }
+
+ public boolean isUppercaseRequired() {
+ return uppercaseRequired;
+ }
+
+ public void setUppercaseRequired(boolean uppercaseRequired) {
+ this.uppercaseRequired = uppercaseRequired;
+ }
+
+ public List<String> getWordsNotPermitted() {
+ if (wordsNotPermitted == null) {
+ wordsNotPermitted = new ArrayList<String>();
+ }
+ return wordsNotPermitted;
+ }
+
+ public void setWordsNotPermitted(List<String> wordsNotPermitted) {
+ this.wordsNotPermitted = wordsNotPermitted;
+ }
+
+ public boolean isAlphanumericRequired() {
+ return alphanumericRequired;
+ }
+
+ public void setAlphanumericRequired(boolean alphanumericRequired) {
+ this.alphanumericRequired = alphanumericRequired;
+ }
+
+ public boolean isMustEndWithAlpha() {
+ return mustEndWithAlpha;
+ }
+
+ public void setMustEndWithAlpha(boolean mustEndWithAlpha) {
+ this.mustEndWithAlpha = mustEndWithAlpha;
+ }
+
+ public boolean isMustStartWithAlpha() {
+ return mustStartWithAlpha;
+ }
+
+ public void setMustStartWithAlpha(boolean mustStartWithAlpha) {
+ this.mustStartWithAlpha = mustStartWithAlpha;
+ }
+
+ public boolean isMustntEndWithAlpha() {
+ return mustntEndWithAlpha;
+ }
+
+ public void setMustntEndWithAlpha(boolean mustntEndWithAlpha) {
+ this.mustntEndWithAlpha = mustntEndWithAlpha;
+ }
+
+ public boolean isMustntStartWithAlpha() {
+ return mustntStartWithAlpha;
+ }
+
+ public void setMustntStartWithAlpha(boolean mustntStartWithAlpha) {
+ this.mustntStartWithAlpha = mustntStartWithAlpha;
+ }
+
+ public int getHistoryLength() {
+ return historyLength;
+ }
+
+ public void setHistoryLength(int historyLength) {
+ this.historyLength = historyLength;
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PolicyType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PolicyType.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PolicyType.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PolicyType.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.types;
+
+public enum PolicyType {
+
+ /**
+ * Account policy like:
+ * password expire time, change password at first access, ...
+ */
+ ACCOUNT("Account Policy"),
+ GLOBAL_ACCOUNT("Account Global Policy"),
+ /**
+ * Password policy regarding password syntax.
+ */
+ PASSWORD("Password Policy"),
+ GLOBAL_PASSWORD("Password Global Policy"),
+ /**
+ * SYNC policy regarding account conflicts resolution.
+ */
+ SYNC("Synchronization Policy"),
+ GLOBAL_SYNC("Synchronization Global Policy");
+
+ private String description;
+
+ PolicyType(final String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+}
Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+public enum PropagationMode {
+
+ ONE_PHASE,
+ TWO_PHASES
+
+}
Added: 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=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,42 @@
+/*
+ * 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;
+
+/**
+ * Status of a TaskExecution.
+ *
+ * CREATED -> SUBMITTED or UBSUBMITTED (depending on the external resource to
+ * return success or failure).
+ * SUBMITTED -> SUCCESS or FAILURE (depending on the external resource to
+ * report success or failure).
+ *
+ * @see TaskExecution
+ */
+public enum PropagationTaskExecStatus {
+
+ CREATED,
+ SUBMITTED,
+ UNSUBMITTED,
+ SUCCESS,
+ FAILURE;
+
+ public boolean isSuccessful() {
+ return this == SUCCESS || this == SUBMITTED;
+ }
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,28 @@
+/*
+ * 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;
+
+public enum ReportExecExportFormat {
+
+ XML,
+ HTML,
+ PDF,
+ RTF
+
+}
Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java?rev=1436230&view=auto
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java (added)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java Mon Jan 21 09:08:54 2013
@@ -0,0 +1,28 @@
+/*
+ * 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;
+
+public enum ReportExecStatus {
+
+ STARTED,
+ RUNNING,
+ SUCCESS,
+ FAILURE;
+
+}