http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java new file mode 100644 index 0000000..9f455dc --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnPoolConfTO.java @@ -0,0 +1,81 @@ +/* + * 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.lib.to; + +import org.apache.syncope.common.lib.AbstractBaseBean; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "connPoolConf") +@XmlType +public class ConnPoolConfTO extends AbstractBaseBean { + + private static final long serialVersionUID = -214360178113476623L; + + private Integer maxObjects; + + private Integer minIdle; + + private Integer maxIdle; + + private Long maxWait; + + private Long minEvictableIdleTimeMillis; + + public Integer getMaxObjects() { + return maxObjects; + } + + public void setMaxObjects(final Integer maxObjects) { + this.maxObjects = maxObjects; + } + + public Integer getMinIdle() { + return minIdle; + } + + public void setMinIdle(final Integer minIdle) { + this.minIdle = minIdle; + } + + public Integer getMaxIdle() { + return maxIdle; + } + + public void setMaxIdle(final Integer maxIdle) { + this.maxIdle = maxIdle; + } + + public Long getMaxWait() { + return maxWait; + } + + public void setMaxWait(final Long maxWait) { + this.maxWait = maxWait; + } + + public Long getMinEvictableIdleTimeMillis() { + return minEvictableIdleTimeMillis; + } + + public void setMinEvictableIdleTimeMillis(final Long minEvictableIdleTimeMillis) { + this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis; + } + +}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java new file mode 100644 index 0000000..dc84864 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/DerSchemaTO.java @@ -0,0 +1,39 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "derivedSchema") +@XmlType +public class DerSchemaTO extends AbstractSchemaTO { + + private static final long serialVersionUID = -6747399803792103108L; + + private String expression; + + public String getExpression() { + return expression; + } + + public void setExpression(final String expression) { + this.expression = expression; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java new file mode 100644 index 0000000..e0f14ad --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java @@ -0,0 +1,66 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +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.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.types.ClientExceptionType; + +@XmlRootElement(name = "error") +@XmlType +public class ErrorTO extends AbstractBaseBean { + + private static final long serialVersionUID = 2435764161719225927L; + + private int status; + + private ClientExceptionType type; + + private final List<Object> elements = new ArrayList<>(); + + public int getStatus() { + return status; + } + + public void setStatus(final int status) { + this.status = status; + } + + public ClientExceptionType getType() { + return type; + } + + public void setType(final ClientExceptionType type) { + this.type = type; + } + + @XmlElementWrapper(name = "elements") + @XmlElement(name = "element") + @JsonProperty("elements") + public List<Object> getElements() { + return elements; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java new file mode 100644 index 0000000..8e11686 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java @@ -0,0 +1,89 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +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.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.types.AuditElements; + +@XmlRootElement(name = "eventCategory") +@XmlType +public class EventCategoryTO extends AbstractBaseBean { + + private static final long serialVersionUID = -4340060002701633401L; + + private AuditElements.EventCategoryType type; + + private String category; + + private String subcategory; + + private final List<String> events = new ArrayList<String>(); + + /** + * Constructor for Type.REST event category. + */ + public EventCategoryTO() { + this.type = AuditElements.EventCategoryType.REST; + } + + /** + * Constructor for the given Type event category. + */ + public EventCategoryTO(final AuditElements.EventCategoryType type) { + this.type = type; + } + + public AuditElements.EventCategoryType getType() { + return type; + } + + public void setType(final AuditElements.EventCategoryType type) { + this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type; + } + + public String getCategory() { + return category; + } + + public void setCategory(final String category) { + this.category = category; + } + + public String getSubcategory() { + return subcategory; + } + + public void setSubcategory(final String subcategory) { + this.subcategory = subcategory; + } + + @XmlElementWrapper(name = "events") + @XmlElement(name = "event") + @JsonProperty("events") + public List<String> getEvents() { + return events; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java new file mode 100644 index 0000000..810a143 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/LoggerTO.java @@ -0,0 +1,51 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.types.LoggerLevel; + +@XmlRootElement(name = "logger") +@XmlType +public class LoggerTO extends AbstractBaseBean { + + private static final long serialVersionUID = -7794833835668648505L; + + private String key; + + private LoggerLevel level; + + public LoggerLevel getLevel() { + return level; + } + + public void setLevel(final LoggerLevel level) { + this.level = level; + } + + public String getKey() { + return key; + } + + public void setKey(final String key) { + this.key = key; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java new file mode 100644 index 0000000..4df561c --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java @@ -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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.types.IntMappingType; +import org.apache.syncope.common.lib.types.MappingPurpose; + +@XmlRootElement(name = "mappingItem") +@XmlType +public class MappingItemTO extends AbstractBaseBean { + + private static final long serialVersionUID = 2983498836767176862L; + + private Long key; + + /** + * 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"; + + /** + * Mapping purposes: SYNCHRONIZATION, PROPAGATION, BOTH, NONE. + */ + private MappingPurpose purpose; + + public boolean isAccountid() { + return accountid; + } + + public void setAccountid(final boolean accountid) { + this.accountid = accountid; + } + + public String getExtAttrName() { + return extAttrName; + } + + public void setExtAttrName(final String extAttrName) { + this.extAttrName = extAttrName; + } + + public Long getKey() { + return key; + } + + public void setKey(final Long key) { + this.key = key; + } + + public String getMandatoryCondition() { + return mandatoryCondition; + } + + public void setMandatoryCondition(final String mandatoryCondition) { + this.mandatoryCondition = mandatoryCondition; + } + + public boolean isPassword() { + return password; + } + + public void setPassword(final boolean password) { + this.password = password; + } + + public String getIntAttrName() { + return intAttrName; + } + + public void setIntAttrName(final String intAttrName) { + this.intAttrName = intAttrName; + } + + public IntMappingType getIntMappingType() { + return intMappingType; + } + + public void setIntMappingType(final IntMappingType intMappingType) { + this.intMappingType = intMappingType; + } + + public MappingPurpose getPurpose() { + return purpose; + } + + public void setPurpose(final MappingPurpose purpose) { + this.purpose = purpose; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java new file mode 100644 index 0000000..aea9556 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java @@ -0,0 +1,117 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +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.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.types.IntMappingType; + +@XmlRootElement(name = "mapping") +@XmlType +public class MappingTO extends AbstractBaseBean { + + private static final long serialVersionUID = 8447688036282611118L; + + private String accountLink; + + private final List<MappingItemTO> items = new ArrayList<>(); + + public String getAccountLink() { + return accountLink; + } + + public void setAccountLink(final String accountLink) { + this.accountLink = accountLink; + } + + public MappingItemTO getAccountIdItem() { + MappingItemTO accountIdItem = null; + for (MappingItemTO item : getItems()) { + if (item.isAccountid()) { + accountIdItem = item; + } + } + return accountIdItem; + } + + protected boolean addAccountIdItem(final MappingItemTO 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(accountIdItem.getExtAttrName()); + accountIdItem.setAccountid(true); + + return this.addItem(accountIdItem); + } + + public boolean setAccountIdItem(final MappingItemTO accountIdItem) { + return accountIdItem == null + ? removeItem(getAccountIdItem()) + : 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(null); + passwordItem.setPassword(true); + return addItem(passwordItem); + } + } + + @XmlElementWrapper(name = "items") + @XmlElement(name = "item") + @JsonProperty("items") + public List<MappingItemTO> getItems() { + return 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); + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java new file mode 100644 index 0000000..d53e20a --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java @@ -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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "membership") +@XmlType +public class MembershipTO extends AbstractAttributableTO { + + private static final long serialVersionUID = 5992828670273935861L; + + private long roleId; + + private String roleName; + + public long getRoleId() { + return roleId; + } + + public void setRoleId(final long roleId) { + this.roleId = roleId; + } + + public String getRoleName() { + return roleName; + } + + public void setRoleName(final String roleName) { + this.roleName = roleName; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java new file mode 100644 index 0000000..51feffa --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java @@ -0,0 +1,175 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +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.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.types.IntMappingType; +import org.apache.syncope.common.lib.types.TraceLevel; + +@XmlRootElement(name = "notification") +@XmlType +public class NotificationTO extends AbstractBaseBean { + + private static final long serialVersionUID = -6145117115632592612L; + + private Long key; + + private final List<String> events = new ArrayList<>(); + + private String userAbout; + + private String roleAbout; + + private String recipients; + + private final List<String> staticRecipients = new ArrayList<>(); + + private IntMappingType recipientAttrType; + + private String recipientAttrName; + + private boolean selfAsRecipient; + + private String sender; + + private String subject; + + private String template; + + private TraceLevel traceLevel; + + private boolean active; + + public String getUserAbout() { + return userAbout; + } + + public void setUserAbout(final String userAbout) { + this.userAbout = userAbout; + } + + public String getRoleAbout() { + return roleAbout; + } + + public void setRoleAbout(final String roleAbout) { + this.roleAbout = roleAbout; + } + + @XmlElementWrapper(name = "events") + @XmlElement(name = "event") + @JsonProperty("events") + public List<String> getEvents() { + return events; + } + + @XmlElementWrapper(name = "staticRecipients") + @XmlElement(name = "staticRecipient") + @JsonProperty("staticRecipients") + public List<String> getStaticRecipients() { + return staticRecipients; + } + + public Long getKey() { + return key; + } + + public void setKey(Long key) { + this.key = key; + } + + public String getRecipients() { + return recipients; + } + + public void setRecipients(final String recipients) { + this.recipients = recipients; + } + + public String getRecipientAttrName() { + return recipientAttrName; + } + + public void setRecipientAttrName(final String recipientAttrName) { + this.recipientAttrName = recipientAttrName; + } + + public IntMappingType getRecipientAttrType() { + return recipientAttrType; + } + + public void setRecipientAttrType(final IntMappingType recipientAttrType) { + this.recipientAttrType = recipientAttrType; + } + + public boolean isSelfAsRecipient() { + return selfAsRecipient; + } + + public void setSelfAsRecipient(final boolean selfAsRecipient) { + this.selfAsRecipient = selfAsRecipient; + } + + 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 getTemplate() { + return template; + } + + public void setTemplate(final String template) { + this.template = template; + } + + public TraceLevel getTraceLevel() { + return traceLevel; + } + + public void setTraceLevel(final TraceLevel traceLevel) { + this.traceLevel = traceLevel; + } + + public boolean isActive() { + return active; + } + + public void setActive(final boolean active) { + this.active = active; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java new file mode 100644 index 0000000..48661f9 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java @@ -0,0 +1,105 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashSet; +import java.util.Set; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.types.TraceLevel; + +@XmlRootElement(name = "notificationTask") +@XmlType +public class NotificationTaskTO extends AbstractTaskTO { + + private static final long serialVersionUID = 371671242591093846L; + + private final Set<String> recipients = new HashSet<>(); + + private String sender; + + private String subject; + + private String textBody; + + private String htmlBody; + + private boolean executed; + + private TraceLevel traceLevel; + + @XmlElementWrapper(name = "recipients") + @XmlElement(name = "recipient") + @JsonProperty("recipients") + public Set<String> getRecipients() { + return 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(final TraceLevel traceLevel) { + this.traceLevel = traceLevel; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java new file mode 100644 index 0000000..f383ece --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java @@ -0,0 +1,98 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.net.URI; +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.lib.AbstractBaseBean; + +@XmlRootElement(name = "pagedResult") +@XmlType +public class PagedResult<T extends AbstractBaseBean> extends AbstractBaseBean { + + private static final long serialVersionUID = 3472875885259250934L; + + private URI prev; + + private URI next; + + private final List<T> result = new ArrayList<T>(); + + private int page; + + private int size; + + private int totalCount; + + public URI getPrev() { + return prev; + } + + public void setPrev(final URI prev) { + this.prev = prev; + } + + public URI getNext() { + return next; + } + + public void setNext(final URI next) { + this.next = next; + } + + @XmlElementWrapper(name = "result") + @XmlElement(name = "item") + @JsonProperty("result") + @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") + public List<T> getResult() { + return result; + } + + public int getPage() { + return page; + } + + public void setPage(final int page) { + this.page = page; + } + + public int getSize() { + return size; + } + + public void setSize(final int size) { + this.size = size; + } + + public int getTotalCount() { + return totalCount; + } + + public void setTotalCount(final int totalCount) { + this.totalCount = totalCount; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java new file mode 100644 index 0000000..05c4e5a --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PasswordPolicyTO.java @@ -0,0 +1,54 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.types.PasswordPolicySpec; +import org.apache.syncope.common.lib.types.PolicyType; + +@XmlRootElement(name = "passwordPolicy") +@XmlType +public class PasswordPolicyTO extends AbstractPolicyTO { + + private static final long serialVersionUID = -5606086441294799690L; + + private PasswordPolicySpec specification; + + public PasswordPolicyTO() { + this(false); + } + + public PasswordPolicyTO(boolean global) { + super(); + + PolicyType type = global + ? PolicyType.GLOBAL_PASSWORD + : PolicyType.PASSWORD; + setType(type); + } + + public void setSpecification(final PasswordPolicySpec specification) { + this.specification = specification; + } + + public PasswordPolicySpec getSpecification() { + return specification; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java new file mode 100644 index 0000000..4568e36 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PlainSchemaTO.java @@ -0,0 +1,156 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.common.lib.types.AttrSchemaType; +import org.apache.syncope.common.lib.types.CipherAlgorithm; + +@XmlRootElement(name = "schema") +@XmlType +public class PlainSchemaTO extends AbstractSchemaTO { + + private static final long serialVersionUID = -8133983392476990308L; + + private AttrSchemaType type = AttrSchemaType.String; + + private String mandatoryCondition; + + private boolean multivalue; + + private boolean uniqueConstraint; + + private boolean readonly; + + private String conversionPattern; + + private String validatorClass; + + private String enumerationValues; + + private String enumerationKeys; + + private String secretKey; + + private CipherAlgorithm cipherAlgorithm; + + private String mimeType; + + 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 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 AttrSchemaType getType() { + return type; + } + + public void setType(final AttrSchemaType type) { + this.type = type; + } + + public String getValidatorClass() { + return validatorClass; + } + + public void setValidatorClass(final String validatorClass) { + this.validatorClass = validatorClass; + } + + 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 String getSecretKey() { + return secretKey; + } + + public void setSecretKey(final String secretKey) { + this.secretKey = secretKey; + } + + public CipherAlgorithm getCipherAlgorithm() { + return cipherAlgorithm; + } + + public void setCipherAlgorithm(final CipherAlgorithm cipherAlgorithm) { + this.cipherAlgorithm = cipherAlgorithm; + } + + public String getMimeType() { + return mimeType; + } + + public void setMimeType(final String mimeType) { + this.mimeType = mimeType; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java new file mode 100644 index 0000000..de844be --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationStatus.java @@ -0,0 +1,152 @@ +/* + * 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.lib.to; + +import org.apache.syncope.common.lib.AbstractBaseBean; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.types.PropagationTaskExecStatus; + +/** + * Single propagation status. + */ +@XmlRootElement(name = "propagationStatus") +@XmlType +public class PropagationStatus 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 resource; + + /** + * Propagation task execution status. + */ + private PropagationTaskExecStatus status; + + /** + * Propagation task execution failure message. + */ + private String failureReason; + + /** + * 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 getResource() { + return resource; + } + + /** + * Resource name setter. + * + * @param resource resource name + */ + public void setResource(final String resource) { + this.resource = resource; + } + + /** + * 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; + } + + /** + * Propagation execution message getter. + * + * @return failureReason. + */ + public String getFailureReason() { + return failureReason; + } + + /** + * Propagation execution failure message setter. + * + * @param failureReason describes why this propagation failed + */ + public void setFailureReason(final String failureReason) { + this.failureReason = failureReason; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java new file mode 100644 index 0000000..7c6ec08 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PropagationTaskTO.java @@ -0,0 +1,123 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.types.PropagationMode; +import org.apache.syncope.common.lib.types.ResourceOperation; +import org.apache.syncope.common.lib.types.SubjectType; + +@XmlRootElement(name = "propagationTask") +@XmlType +public class PropagationTaskTO extends AbstractTaskTO { + + 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 SubjectType subjectType; + + private Long subjectId; + + public String getAccountId() { + return accountId; + } + + public void setAccountId(final String accountId) { + this.accountId = accountId; + } + + public String getOldAccountId() { + return oldAccountId; + } + + public void setOldAccountId(final String oldAccountId) { + this.oldAccountId = oldAccountId; + } + + public PropagationMode getPropagationMode() { + return propagationMode; + } + + public void setPropagationMode(final PropagationMode propagationMode) { + this.propagationMode = propagationMode; + } + + public String getResource() { + return resource; + } + + public void setResource(final String resource) { + this.resource = resource; + } + + public ResourceOperation getPropagationOperation() { + return propagationOperation; + } + + public void setPropagationOperation(final ResourceOperation propagationOperation) { + + this.propagationOperation = propagationOperation; + } + + public String getXmlAttributes() { + return xmlAttributes; + } + + public void setXmlAttributes(final String xmlAttributes) { + this.xmlAttributes = xmlAttributes; + } + + public String getObjectClassName() { + return objectClassName; + } + + public void setObjectClassName(final String objectClassName) { + this.objectClassName = objectClassName; + } + + public SubjectType getSubjectType() { + return subjectType; + } + + public void setSubjectType(final SubjectType subjectType) { + this.subjectType = subjectType; + } + + public Long getSubjectId() { + return subjectId; + } + + public void setSubjectId(final Long subjectId) { + this.subjectId = subjectId; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java new file mode 100644 index 0000000..13d2ff4 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java @@ -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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "pushTask") +@XmlType +public class PushTaskTO extends AbstractProvisioningTaskTO { + + private static final long serialVersionUID = -2143537546915809018L; + + private String userFilter; + + private String roleFilter; + + public String getUserFilter() { + return userFilter; + } + + public void setUserFilter(final String filter) { + this.userFilter = filter; + } + + public String getRoleFilter() { + return roleFilter; + } + + public void setRoleFilter(final String roleFilter) { + this.roleFilter = roleFilter; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java new file mode 100644 index 0000000..ef92b3b --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java @@ -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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "reportExec") +@XmlType +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; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java new file mode 100644 index 0000000..3d4d4fc --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java @@ -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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.report.AbstractReportletConf; + +@XmlRootElement(name = "report") +@XmlType +public class ReportTO extends AbstractBaseBean { + + private static final long serialVersionUID = 5274568072084814410L; + + private long key; + + private String name; + + private final List<AbstractReportletConf> reportletConfs = new ArrayList<>(); + + private String cronExpression; + + private final List<ReportExecTO> executions = new ArrayList<>(); + + private String latestExecStatus; + + private Date lastExec; + + private Date nextExec; + + private Date startDate; + + private Date endDate; + + public long getKey() { + return key; + } + + public void setKey(long key) { + this.key = key; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + + @XmlElementWrapper(name = "reportletConfs") + @XmlElement(name = "reportletConf") + @JsonProperty("reportletConfs") + public List<AbstractReportletConf> getReportletConfs() { + return reportletConfs; + } + + public String getCronExpression() { + return cronExpression; + } + + public void setCronExpression(final String cronExpression) { + this.cronExpression = cronExpression; + } + + @XmlElementWrapper(name = "executions") + @XmlElement(name = "execution") + @JsonProperty("executions") + public List<ReportExecTO> getExecutions() { + return executions; + } + + public String getLatestExecStatus() { + return latestExecStatus; + } + + public void setLatestExecStatus(final String latestExecStatus) { + this.latestExecStatus = latestExecStatus; + } + + public Date getLastExec() { + return lastExec == null + ? null + : new Date(lastExec.getTime()); + } + + public void setLastExec(final 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(final 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(final 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(final Date endDate) { + if (endDate != null) { + this.endDate = new Date(endDate.getTime()); + } + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java new file mode 100644 index 0000000..98f33d2 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java @@ -0,0 +1,270 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.types.ConnConfProperty; +import org.apache.syncope.common.lib.types.PropagationMode; +import org.apache.syncope.common.lib.types.TraceLevel; + +@XmlRootElement(name = "resource") +@XmlType +public class ResourceTO extends AbstractAnnotatedBean { + + 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; + + /** + * Convenience information: display name for the connector id. + */ + private String connectorDisplayName; + + private MappingTO umapping; + + private MappingTO rmapping; + + private boolean propagationPrimary; + + private int propagationPriority; + + private boolean randomPwdIfNotProvided; + + 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 List<String> propagationActionsClassNames = new ArrayList<>(); + + public ResourceTO() { + super(); + + connConfProperties = new HashSet<>(); + propagationMode = PropagationMode.TWO_PHASES; + propagationPriority = 0; + + createTraceLevel = TraceLevel.ALL; + updateTraceLevel = TraceLevel.ALL; + deleteTraceLevel = TraceLevel.ALL; + syncTraceLevel = TraceLevel.ALL; + } + + public String getKey() { + return name; + } + + public void setKey(final String key) { + this.name = key; + } + + public boolean isEnforceMandatoryCondition() { + return enforceMandatoryCondition; + } + + public void setEnforceMandatoryCondition(final boolean enforceMandatoryCondition) { + this.enforceMandatoryCondition = enforceMandatoryCondition; + } + + public Long getConnectorId() { + return connectorId; + } + + public void setConnectorId(final Long connectorId) { + this.connectorId = connectorId; + } + + public String getConnectorDisplayName() { + return connectorDisplayName; + } + + public void setConnectorDisplayName(final String connectorDisplayName) { + this.connectorDisplayName = connectorDisplayName; + } + + public MappingTO getUmapping() { + return umapping; + } + + public void setUmapping(final MappingTO umapping) { + this.umapping = umapping; + } + + public MappingTO getRmapping() { + return rmapping; + } + + public void setRmapping(final MappingTO rmapping) { + this.rmapping = rmapping; + } + + public boolean isPropagationPrimary() { + return propagationPrimary; + } + + public void setPropagationPrimary(final boolean propagationPrimary) { + this.propagationPrimary = propagationPrimary; + } + + public int getPropagationPriority() { + return propagationPriority; + } + + public void setPropagationPriority(final int propagationPriority) { + this.propagationPriority = propagationPriority; + } + + public boolean isRandomPwdIfNotProvided() { + return randomPwdIfNotProvided; + } + + public void setRandomPwdIfNotProvided(final boolean randomPwdIfNotProvided) { + this.randomPwdIfNotProvided = randomPwdIfNotProvided; + } + + public PropagationMode getPropagationMode() { + return propagationMode; + } + + public void setPropagationMode(final PropagationMode propagationMode) { + this.propagationMode = propagationMode; + } + + public TraceLevel getCreateTraceLevel() { + return createTraceLevel; + } + + public void setCreateTraceLevel(final TraceLevel createTraceLevel) { + this.createTraceLevel = createTraceLevel; + } + + public TraceLevel getDeleteTraceLevel() { + return deleteTraceLevel; + } + + public void setDeleteTraceLevel(final TraceLevel deleteTraceLevel) { + this.deleteTraceLevel = deleteTraceLevel; + } + + public TraceLevel getUpdateTraceLevel() { + return updateTraceLevel; + } + + public void setUpdateTraceLevel(final TraceLevel updateTraceLevel) { + this.updateTraceLevel = updateTraceLevel; + } + + public Long getPasswordPolicy() { + return passwordPolicy; + } + + public void setPasswordPolicy(final Long passwordPolicy) { + this.passwordPolicy = passwordPolicy; + } + + public Long getAccountPolicy() { + return accountPolicy; + } + + public void setAccountPolicy(final Long accountPolicy) { + this.accountPolicy = accountPolicy; + } + + public Long getSyncPolicy() { + return syncPolicy; + } + + public void setSyncPolicy(final Long syncPolicy) { + this.syncPolicy = syncPolicy; + } + + @XmlElementWrapper(name = "connConfProperties") + @XmlElement(name = "property") + @JsonProperty("connConfProperties") + public Set<ConnConfProperty> getConnConfProperties() { + return 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; + } + + @XmlElementWrapper(name = "propagationActionsClassNames") + @XmlElement(name = "propagationActionsClassName") + @JsonProperty("propagationActionsClassNames") + public List<String> getPropagationActionsClassNames() { + return propagationActionsClassNames; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java new file mode 100644 index 0000000..7f0f0af --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java @@ -0,0 +1,258 @@ +/* + * 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.lib.to; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +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; + +@XmlRootElement(name = "role") +@XmlType +@JsonIgnoreProperties({ "displayName" }) +public class RoleTO extends AbstractSubjectTO { + + private static final long serialVersionUID = -7785920258290147542L; + + private String name; + + private long parent; + + private Long userOwner; + + private Long roleOwner; + + private boolean inheritOwner; + + private boolean inheritTemplates; + + private boolean inheritPlainAttrs; + + private boolean inheritDerAttrs; + + private boolean inheritVirAttrs; + + private boolean inheritPasswordPolicy; + + private boolean inheritAccountPolicy; + + private final List<String> entitlements = new ArrayList<>(); + + private List<String> rPlainAttrTemplates = new ArrayList<>(); + + private List<String> rDerAttrTemplates = new ArrayList<>(); + + private List<String> rVirAttrTemplates = new ArrayList<>(); + + private List<String> mPlainAttrTemplates = new ArrayList<>(); + + private List<String> mDerAttrTemplates = new ArrayList<>(); + + private List<String> mVirAttrTemplates = new ArrayList<>(); + + private Long passwordPolicy; + + private Long accountPolicy; + + 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 isInheritTemplates() { + return inheritTemplates; + } + + public void setInheritTemplates(boolean inheritTemplates) { + this.inheritTemplates = inheritTemplates; + } + + public boolean isInheritPlainAttrs() { + return inheritPlainAttrs; + } + + public void setInheritPlainAttrs(final boolean inheritPlainAttrs) { + this.inheritPlainAttrs = inheritPlainAttrs; + } + + public boolean isInheritDerAttrs() { + return inheritDerAttrs; + } + + public void setInheritDerAttrs(final boolean inheritDerAttrs) { + this.inheritDerAttrs = inheritDerAttrs; + } + + public boolean isInheritVirAttrs() { + return inheritVirAttrs; + } + + public void setInheritVirAttrs(final boolean inheritVirAttrs) { + this.inheritVirAttrs = inheritVirAttrs; + } + + @XmlElementWrapper(name = "entitlements") + @XmlElement(name = "entitlement") + @JsonProperty("entitlements") + public List<String> getEntitlements() { + return entitlements; + } + + @XmlElementWrapper(name = "rPlainAttrTemplates") + @XmlElement(name = "rPlainAttrTemplate") + @JsonProperty("rPlainAttrTemplates") + public List<String> getRPlainAttrTemplates() { + return rPlainAttrTemplates; + } + + @XmlElementWrapper(name = "rDerAttrTemplates") + @XmlElement(name = "rDerAttrTemplate") + @JsonProperty("rDerAttrTemplates") + public List<String> getRDerAttrTemplates() { + return rDerAttrTemplates; + } + + @XmlElementWrapper(name = "rVirAttrTemplates") + @XmlElement(name = "rVirAttrTemplate") + @JsonProperty("rVirAttrTemplates") + public List<String> getRVirAttrTemplates() { + return rVirAttrTemplates; + } + + @XmlElementWrapper(name = "mPlainAttrTemplates") + @XmlElement(name = "mPlainAttrTemplate") + @JsonProperty("mPlainAttrTemplates") + public List<String> getMPlainAttrTemplates() { + return mPlainAttrTemplates; + } + + @XmlElementWrapper(name = "mDerAttrTemplates") + @XmlElement(name = "mDerAttrTemplate") + @JsonProperty("mDerAttrTemplates") + public List<String> getMDerAttrTemplates() { + return mDerAttrTemplates; + } + + @XmlElementWrapper(name = "mVirAttrTemplates") + @XmlElement(name = "mVirAttrTemplate") + @JsonProperty("mVirAttrTemplates") + public List<String> getMVirAttrTemplates() { + return mVirAttrTemplates; + } + + public Long getPasswordPolicy() { + return passwordPolicy; + } + + public void setPasswordPolicy(final 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(final boolean inheritPasswordPolicy) { + this.inheritPasswordPolicy = inheritPasswordPolicy; + } + + public Long getAccountPolicy() { + return accountPolicy; + } + + public void setAccountPolicy(final 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(final boolean inheritAccountPolicy) { + this.inheritAccountPolicy = inheritAccountPolicy; + } + + public String getDisplayName() { + return getKey() + " " + getName(); + } + + 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; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java new file mode 100644 index 0000000..330a12d --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SchedTaskTO.java @@ -0,0 +1,101 @@ +/* + * 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.lib.to; + +import java.util.Date; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "schedTask") +@XmlType +@XmlSeeAlso(AbstractProvisioningTaskTO.class) +public class SchedTaskTO extends AbstractTaskTO { + + 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(final String cronExpression) { + this.cronExpression = cronExpression; + } + + public String getJobClassName() { + return jobClassName; + } + + public void setJobClassName(final String jobClassName) { + this.jobClassName = jobClassName; + } + + public Date getLastExec() { + return lastExec == null + ? null + : new Date(lastExec.getTime()); + } + + public void setLastExec(final 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(final Date nextExec) { + if (nextExec != null) { + this.nextExec = new Date(nextExec.getTime()); + } + } + + public String getDescription() { + return description; + } + + public void setDescription(final String description) { + this.description = description; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java new file mode 100644 index 0000000..dd73f2c --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SecurityQuestionTO.java @@ -0,0 +1,51 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.AbstractBaseBean; + +@XmlRootElement(name = "securityQuestion") +@XmlType +public class SecurityQuestionTO extends AbstractBaseBean { + + private static final long serialVersionUID = 5969810939993556530L; + + private long key; + + private String content; + + public long getKey() { + return key; + } + + public void setKey(final long key) { + this.key = key; + } + + public String getContent() { + return content; + } + + public void setContent(final String content) { + this.content = content; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java new file mode 100644 index 0000000..4edcc43 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncPolicyTO.java @@ -0,0 +1,54 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.types.PolicyType; +import org.apache.syncope.common.lib.types.SyncPolicySpec; + +@XmlRootElement(name = "syncPolicy") +@XmlType +public class SyncPolicyTO extends AbstractPolicyTO { + + private static final long serialVersionUID = 993024634238024242L; + + private SyncPolicySpec specification; + + public SyncPolicyTO() { + this(false); + } + + public SyncPolicyTO(final boolean global) { + super(); + + PolicyType type = global + ? PolicyType.GLOBAL_SYNC + : PolicyType.SYNC; + setType(type); + } + + public void setSpecification(final SyncPolicySpec specification) { + this.specification = specification; + } + + public SyncPolicySpec getSpecification() { + return specification; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/2d194636/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java new file mode 100644 index 0000000..9e33e96 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java @@ -0,0 +1,59 @@ +/* + * 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.lib.to; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "syncTask") +@XmlType +public class SyncTaskTO extends AbstractProvisioningTaskTO { + + private static final long serialVersionUID = -2143537546915809017L; + + private UserTO userTemplate; + + private RoleTO roleTemplate; + + private boolean fullReconciliation; + + public UserTO getUserTemplate() { + return userTemplate; + } + + public void setUserTemplate(final UserTO userTemplate) { + this.userTemplate = userTemplate; + } + + public RoleTO getRoleTemplate() { + return roleTemplate; + } + + public void setRoleTemplate(final RoleTO roleTemplate) { + this.roleTemplate = roleTemplate; + } + + public boolean isFullReconciliation() { + return fullReconciliation; + } + + public void setFullReconciliation(boolean fullReconciliation) { + this.fullReconciliation = fullReconciliation; + } +}
