Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java Tue Aug 5 11:20:00 2014 @@ -1,89 +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.to; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlType; - -import org.apache.syncope.common.AbstractBaseBean; - -@XmlType -public class AbstractExecTO extends AbstractBaseBean { - - private static final long serialVersionUID = -4621191979198357081L; - - protected long id; - - protected String status; - - protected String message; - - protected Date startDate; - - protected Date endDate; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - 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()); - } - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.common.to; + +import java.util.Date; + +import javax.xml.bind.annotation.XmlType; + +import org.apache.syncope.common.AbstractBaseBean; + +@XmlType +public class AbstractExecTO extends AbstractBaseBean { + + private static final long serialVersionUID = -4621191979198357081L; + + protected long id; + + protected String status; + + protected String message; + + protected Date startDate; + + protected Date endDate; + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + 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()); + } + } +}
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java Tue Aug 5 11:20:00 2014 @@ -1,91 +1,91 @@ -/* - * 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 com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -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.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; - -import org.apache.syncope.common.AbstractBaseBean; -import org.apache.syncope.common.types.PolicyType; - -@XmlRootElement(name = "abstractPolicy") -@XmlType -@XmlSeeAlso({ AccountPolicyTO.class, PasswordPolicyTO.class, SyncPolicyTO.class }) -@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") -public abstract class AbstractPolicyTO extends AbstractBaseBean { - - private static final long serialVersionUID = -2903888572649721035L; - - private long id; - - private String description; - - private PolicyType type; - - private final List<String> usedByResources = new ArrayList<String>(); - - private final List<Long> usedByRoles = new ArrayList<Long>(); - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getDescription() { - return description; - } - - public void setDescription(final String description) { - this.description = description; - } - - public PolicyType getType() { - return type; - } - - public void setType(final PolicyType type) { - this.type = type; - } - - @XmlElementWrapper(name = "usedByResources") - @XmlElement(name = "resource") - @JsonProperty("usedByResources") - public List<String> getUsedByResources() { - return usedByResources; - } - - @XmlElementWrapper(name = "usedByRoles") - @XmlElement(name = "role") - @JsonProperty("usedByRoles") - public List<Long> getUsedByRoles() { - return usedByRoles; - } - -} +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +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.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + +import org.apache.syncope.common.AbstractBaseBean; +import org.apache.syncope.common.types.PolicyType; + +@XmlRootElement(name = "abstractPolicy") +@XmlType +@XmlSeeAlso({ AccountPolicyTO.class, PasswordPolicyTO.class, SyncPolicyTO.class }) +@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") +public abstract class AbstractPolicyTO extends AbstractBaseBean { + + private static final long serialVersionUID = -2903888572649721035L; + + private long id; + + private String description; + + private PolicyType type; + + private final List<String> usedByResources = new ArrayList<String>(); + + private final List<Long> usedByRoles = new ArrayList<Long>(); + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getDescription() { + return description; + } + + public void setDescription(final String description) { + this.description = description; + } + + public PolicyType getType() { + return type; + } + + public void setType(final PolicyType type) { + this.type = type; + } + + @XmlElementWrapper(name = "usedByResources") + @XmlElement(name = "resource") + @JsonProperty("usedByResources") + public List<String> getUsedByResources() { + return usedByResources; + } + + @XmlElementWrapper(name = "usedByRoles") + @XmlElement(name = "role") + @JsonProperty("usedByRoles") + public List<Long> getUsedByRoles() { + return usedByRoles; + } + +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java Tue Aug 5 11:20:00 2014 @@ -1,45 +1,45 @@ -/* - * 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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; - -import org.apache.syncope.common.AbstractBaseBean; - -@XmlRootElement(name = "abstractSchema") -@XmlType -@XmlSeeAlso({ SchemaTO.class, DerSchemaTO.class, VirSchemaTO.class }) -@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") -public abstract class AbstractSchemaTO extends AbstractBaseBean { - - private static final long serialVersionUID = 4088388951694301759L; - - private String name; - - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } -} +/* + * 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 com.fasterxml.jackson.annotation.JsonTypeInfo; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + +import org.apache.syncope.common.AbstractBaseBean; + +@XmlRootElement(name = "abstractSchema") +@XmlType +@XmlSeeAlso({ SchemaTO.class, DerSchemaTO.class, VirSchemaTO.class }) +@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") +public abstract class AbstractSchemaTO extends AbstractBaseBean { + + private static final long serialVersionUID = 4088388951694301759L; + + private String name; + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java Tue Aug 5 11:20:00 2014 @@ -1,117 +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.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.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import org.apache.syncope.common.types.MatchingRule; -import org.apache.syncope.common.types.UnmatchingRule; - -@XmlRootElement(name = "abstractSyncTask") -@XmlType -@XmlSeeAlso({ PushTaskTO.class, SyncTaskTO.class }) -public class AbstractSyncTaskTO extends SchedTaskTO { - - private static final long serialVersionUID = -2143537546915809016L; - - private String resource; - - private boolean performCreate; - - private boolean performUpdate; - - private boolean performDelete; - - private boolean syncStatus; - - private UnmatchingRule unmatchingRule; - - private MatchingRule matchingRule; - - private List<String> actionsClassNames = new ArrayList<String>(); - - public String getResource() { - return resource; - } - - public void setResource(String resource) { - this.resource = resource; - } - - public boolean isPerformCreate() { - return performCreate; - } - - public void setPerformCreate(boolean performCreate) { - this.performCreate = performCreate; - } - - public boolean isPerformUpdate() { - return performUpdate; - } - - public void setPerformUpdate(boolean performUpdate) { - this.performUpdate = performUpdate; - } - - public boolean isPerformDelete() { - return performDelete; - } - - public void setPerformDelete(boolean performDelete) { - this.performDelete = performDelete; - } - - public boolean isSyncStatus() { - return syncStatus; - } - - public void setSyncStatus(boolean syncStatus) { - this.syncStatus = syncStatus; - } - - @XmlElementWrapper(name = "actionsClassNames") - @XmlElement(name = "actionsClassName") - @JsonProperty("actionsClassNames") - public List<String> getActionsClassNames() { - return actionsClassNames; - } - - public UnmatchingRule getUnmatchingRule() { - return unmatchingRule; - } - - public void setUnmatchingRule(final UnmatchingRule unmatchigRule) { - this.unmatchingRule = unmatchigRule; - } - - public MatchingRule getMatchingRule() { - return matchingRule; - } - - public void setMatchingRule(final MatchingRule matchigRule) { - this.matchingRule = matchigRule; - } -} +/* + * 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 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.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.types.MatchingRule; +import org.apache.syncope.common.types.UnmatchingRule; + +@XmlRootElement(name = "abstractSyncTask") +@XmlType +@XmlSeeAlso({ PushTaskTO.class, SyncTaskTO.class }) +public class AbstractSyncTaskTO extends SchedTaskTO { + + private static final long serialVersionUID = -2143537546915809016L; + + private String resource; + + private boolean performCreate; + + private boolean performUpdate; + + private boolean performDelete; + + private boolean syncStatus; + + private UnmatchingRule unmatchingRule; + + private MatchingRule matchingRule; + + private List<String> actionsClassNames = new ArrayList<String>(); + + public String getResource() { + return resource; + } + + public void setResource(String resource) { + this.resource = resource; + } + + public boolean isPerformCreate() { + return performCreate; + } + + public void setPerformCreate(boolean performCreate) { + this.performCreate = performCreate; + } + + public boolean isPerformUpdate() { + return performUpdate; + } + + public void setPerformUpdate(boolean performUpdate) { + this.performUpdate = performUpdate; + } + + public boolean isPerformDelete() { + return performDelete; + } + + public void setPerformDelete(boolean performDelete) { + this.performDelete = performDelete; + } + + public boolean isSyncStatus() { + return syncStatus; + } + + public void setSyncStatus(boolean syncStatus) { + this.syncStatus = syncStatus; + } + + @XmlElementWrapper(name = "actionsClassNames") + @XmlElement(name = "actionsClassName") + @JsonProperty("actionsClassNames") + public List<String> getActionsClassNames() { + return actionsClassNames; + } + + public UnmatchingRule getUnmatchingRule() { + return unmatchingRule; + } + + public void setUnmatchingRule(final UnmatchingRule unmatchigRule) { + this.unmatchingRule = unmatchigRule; + } + + public MatchingRule getMatchingRule() { + return matchingRule; + } + + public void setMatchingRule(final MatchingRule matchigRule) { + this.matchingRule = matchigRule; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java Tue Aug 5 11:20:00 2014 @@ -1,100 +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.to; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -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.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; - -import org.apache.syncope.common.AbstractBaseBean; - -@XmlRootElement(name = "abstractTask") -@XmlType -@XmlSeeAlso({ PropagationTaskTO.class, SchedTaskTO.class, NotificationTaskTO.class }) -@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") -public abstract class AbstractTaskTO extends AbstractBaseBean { - - private static final long serialVersionUID = 386450127003321197L; - - private long id; - - private String latestExecStatus; - - private List<TaskExecTO> executions = new ArrayList<TaskExecTO>(); - - private Date startDate; - - private Date endDate; - - public long getId() { - return id; - } - - public void setId(final long id) { - this.id = id; - } - - public String getLatestExecStatus() { - return latestExecStatus; - } - - public void setLatestExecStatus(final String latestExecStatus) { - this.latestExecStatus = latestExecStatus; - } - - @XmlElementWrapper(name = "executions") - @XmlElement(name = "execution") - @JsonProperty("executions") - public List<TaskExecTO> getExecutions() { - return executions; - } - - 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()); - } - } -} +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +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.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + +import org.apache.syncope.common.AbstractBaseBean; + +@XmlRootElement(name = "abstractTask") +@XmlType +@XmlSeeAlso({ PropagationTaskTO.class, SchedTaskTO.class, NotificationTaskTO.class }) +@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") +public abstract class AbstractTaskTO extends AbstractBaseBean { + + private static final long serialVersionUID = 386450127003321197L; + + private long id; + + private String latestExecStatus; + + private List<TaskExecTO> executions = new ArrayList<TaskExecTO>(); + + private Date startDate; + + private Date endDate; + + public long getId() { + return id; + } + + public void setId(final long id) { + this.id = id; + } + + public String getLatestExecStatus() { + return latestExecStatus; + } + + public void setLatestExecStatus(final String latestExecStatus) { + this.latestExecStatus = latestExecStatus; + } + + @XmlElementWrapper(name = "executions") + @XmlElement(name = "execution") + @JsonProperty("executions") + public List<TaskExecTO> getExecutions() { + return executions; + } + + 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()); + } + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java Tue Aug 5 11:20:00 2014 @@ -1,69 +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.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.types.AccountPolicySpec; -import org.apache.syncope.common.types.PolicyType; - -@XmlRootElement(name = "accountPolicy") -@XmlType -public class AccountPolicyTO extends AbstractPolicyTO { - - private static final long serialVersionUID = -1557150042828800134L; - - private AccountPolicySpec specification; - - private final List<String> resources = new ArrayList<String>(); - - public AccountPolicyTO() { - this(false); - } - - public AccountPolicyTO(boolean global) { - super(); - - PolicyType type = global - ? PolicyType.GLOBAL_ACCOUNT - : PolicyType.ACCOUNT; - setType(type); - } - - public void setSpecification(final AccountPolicySpec specification) { - this.specification = specification; - } - - public AccountPolicySpec getSpecification() { - return specification; - } - - @XmlElementWrapper(name = "resources") - @XmlElement(name = "resource") - @JsonProperty("resources") - public List<String> getResources() { - return resources; - } -} +/* + * 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 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.types.AccountPolicySpec; +import org.apache.syncope.common.types.PolicyType; + +@XmlRootElement(name = "accountPolicy") +@XmlType +public class AccountPolicyTO extends AbstractPolicyTO { + + private static final long serialVersionUID = -1557150042828800134L; + + private AccountPolicySpec specification; + + private final List<String> resources = new ArrayList<String>(); + + public AccountPolicyTO() { + this(false); + } + + public AccountPolicyTO(boolean global) { + super(); + + PolicyType type = global + ? PolicyType.GLOBAL_ACCOUNT + : PolicyType.ACCOUNT; + setType(type); + } + + public void setSpecification(final AccountPolicySpec specification) { + this.specification = specification; + } + + public AccountPolicySpec getSpecification() { + return specification; + } + + @XmlElementWrapper(name = "resources") + @XmlElement(name = "resource") + @JsonProperty("resources") + public List<String> getResources() { + return resources; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java Tue Aug 5 11:20:00 2014 @@ -1,94 +1,94 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.common.to; - -import 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.AbstractBaseBean; - -@XmlRootElement(name = "attribute") -@XmlType -public class AttributeTO extends AbstractBaseBean { - - private static final long serialVersionUID = 4941691338796323623L; - - /** - * Name of the schema that this attribute is referring to. - */ - private String schema; - - /** - * Set of (string) values of this attribute. - */ - private final List<String> values; - - /** - * Whether this attribute is read-only or not. - */ - private boolean readonly; - - /** - * Default constructor. - */ - public AttributeTO() { - super(); - values = new ArrayList<String>(); - readonly = false; - } - - /** - * @return the name of the schema that this attribute is referring to - */ - public String getSchema() { - return schema; - } - - /** - * @param schema name to be set - */ - public void setSchema(final String schema) { - this.schema = schema; - - } - - /** - * @return attribute values as strings - */ - @XmlElementWrapper(name = "values") - @XmlElement(name = "value") - @JsonProperty("values") - public List<String> getValues() { - return values; - } - - public boolean isReadonly() { - return readonly; - } - - public void setReadonly(boolean readonly) { - this.readonly = readonly; - } -} +/* + * 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 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.AbstractBaseBean; + +@XmlRootElement(name = "attribute") +@XmlType +public class AttributeTO extends AbstractBaseBean { + + private static final long serialVersionUID = 4941691338796323623L; + + /** + * Name of the schema that this attribute is referring to. + */ + private String schema; + + /** + * Set of (string) values of this attribute. + */ + private final List<String> values; + + /** + * Whether this attribute is read-only or not. + */ + private boolean readonly; + + /** + * Default constructor. + */ + public AttributeTO() { + super(); + values = new ArrayList<String>(); + readonly = false; + } + + /** + * @return the name of the schema that this attribute is referring to + */ + public String getSchema() { + return schema; + } + + /** + * @param schema name to be set + */ + public void setSchema(final String schema) { + this.schema = schema; + + } + + /** + * @return attribute values as strings + */ + @XmlElementWrapper(name = "values") + @XmlElement(name = "value") + @JsonProperty("values") + public List<String> getValues() { + return values; + } + + public boolean isReadonly() { + return readonly; + } + + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConfTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConfTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConfTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConfTO.java Tue Aug 5 11:20:00 2014 @@ -1,30 +1,30 @@ -/* - * 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; - -@XmlRootElement(name = "conf") -@XmlType -public class ConfTO extends AbstractAttributableTO { - - private static final long serialVersionUID = -3825039700228595590L; - -} +/* + * 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; + +@XmlRootElement(name = "conf") +@XmlType +public class ConfTO extends AbstractAttributableTO { + + private static final long serialVersionUID = -3825039700228595590L; + +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java Tue Aug 5 11:20:00 2014 @@ -1,97 +1,97 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.common.to; - -import 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.AbstractBaseBean; -import org.apache.syncope.common.types.ConnConfPropSchema; - -@XmlRootElement(name = "connectorBundle") -@XmlType -public class ConnBundleTO extends AbstractBaseBean { - - private static final long serialVersionUID = 7215115961910138005L; - - private String displayName; - - private String location; - - private String bundleName; - - private String connectorName; - - private String version; - - private List<ConnConfPropSchema> properties = new ArrayList<ConnConfPropSchema>(); - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(final String displayName) { - this.displayName = displayName; - } - - public String getLocation() { - return location; - } - - public void setLocation(final String location) { - this.location = location; - } - - public String getBundleName() { - return bundleName; - } - - public void setBundleName(final String bundleName) { - this.bundleName = bundleName; - } - - public String getConnectorName() { - return connectorName; - } - - public void setConnectorName(final String connectorName) { - this.connectorName = connectorName; - } - - @XmlElementWrapper(name = "properties") - @XmlElement(name = "connConfPropSchema") - @JsonProperty("properties") - public List<ConnConfPropSchema> getProperties() { - return properties; - } - - public String getVersion() { - return version; - } - - public void setVersion(final String version) { - this.version = version; - } -} +/* + * 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 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.AbstractBaseBean; +import org.apache.syncope.common.types.ConnConfPropSchema; + +@XmlRootElement(name = "connectorBundle") +@XmlType +public class ConnBundleTO extends AbstractBaseBean { + + private static final long serialVersionUID = 7215115961910138005L; + + private String displayName; + + private String location; + + private String bundleName; + + private String connectorName; + + private String version; + + private List<ConnConfPropSchema> properties = new ArrayList<ConnConfPropSchema>(); + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(final String displayName) { + this.displayName = displayName; + } + + public String getLocation() { + return location; + } + + public void setLocation(final String location) { + this.location = location; + } + + public String getBundleName() { + return bundleName; + } + + public void setBundleName(final String bundleName) { + this.bundleName = bundleName; + } + + public String getConnectorName() { + return connectorName; + } + + public void setConnectorName(final String connectorName) { + this.connectorName = connectorName; + } + + @XmlElementWrapper(name = "properties") + @XmlElement(name = "connConfPropSchema") + @JsonProperty("properties") + public List<ConnConfPropSchema> getProperties() { + return properties; + } + + public String getVersion() { + return version; + } + + public void setVersion(final String version) { + this.version = version; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java Tue Aug 5 11:20:00 2014 @@ -1,177 +1,177 @@ -/* - * 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 com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; -import org.apache.syncope.common.AbstractBaseBean; -import org.apache.syncope.common.types.ConnConfProperty; -import org.apache.syncope.common.types.ConnectorCapability; - -@XmlRootElement(name = "connInstance") -@XmlType -public class ConnInstanceTO extends AbstractBaseBean { - - private static final long serialVersionUID = 2707778645445168671L; - - private long id; - - private String location; - - private String connectorName; - - private String bundleName; - - private String version; - - private final Set<ConnConfProperty> configuration; - - private final Set<ConnectorCapability> capabilities; - - private String displayName; - - private Integer connRequestTimeout; - - private ConnPoolConfTO poolConf; - - public ConnInstanceTO() { - super(); - - configuration = new HashSet<ConnConfProperty>(); - capabilities = EnumSet.noneOf(ConnectorCapability.class); - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getLocation() { - return location; - } - - public void setLocation(final String location) { - this.location = location; - } - - public String getConnectorName() { - return connectorName; - } - - public void setConnectorName(final String connectorname) { - this.connectorName = connectorname; - } - - public String getBundleName() { - return bundleName; - } - - public void setBundleName(final String bundlename) { - this.bundleName = bundlename; - } - - public String getVersion() { - return version; - } - - public void setVersion(final String version) { - this.version = version; - } - - @XmlElementWrapper(name = "configuration") - @XmlElement(name = "property") - @JsonProperty("configuration") - public Set<ConnConfProperty> getConfiguration() { - return this.configuration; - } - - @JsonIgnore - public Map<String, ConnConfProperty> getConfigurationMap() { - Map<String, ConnConfProperty> result; - - if (getConfiguration() == null) { - result = Collections.<String, ConnConfProperty>emptyMap(); - } else { - result = new HashMap<String, ConnConfProperty>(); - for (ConnConfProperty prop : getConfiguration()) { - result.put(prop.getSchema().getName(), prop); - } - result = Collections.unmodifiableMap(result); - } - - return result; - } - - @XmlElementWrapper(name = "capabilities") - @XmlElement(name = "capability") - @JsonProperty("capabilities") - public Set<ConnectorCapability> getCapabilities() { - return capabilities; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(final String displayName) { - this.displayName = displayName; - } - - /** - * Get connector request timeout. - * It is not applied in case of sync, full reconciliation and search. - * - * @return timeout. - */ - public Integer getConnRequestTimeout() { - return connRequestTimeout; - } - - /** - * Set connector request timeout. - * It is not applied in case of sync, full reconciliation and search. - * - * @param connRequestTimeout timeout - */ - public void setConnRequestTimeout(final Integer connRequestTimeout) { - this.connRequestTimeout = connRequestTimeout; - } - - public ConnPoolConfTO getPoolConf() { - return poolConf; - } - - public void setPoolConf(final ConnPoolConfTO poolConf) { - this.poolConf = poolConf; - } - -} +/* + * 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 com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Collections; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.AbstractBaseBean; +import org.apache.syncope.common.types.ConnConfProperty; +import org.apache.syncope.common.types.ConnectorCapability; + +@XmlRootElement(name = "connInstance") +@XmlType +public class ConnInstanceTO extends AbstractBaseBean { + + private static final long serialVersionUID = 2707778645445168671L; + + private long id; + + private String location; + + private String connectorName; + + private String bundleName; + + private String version; + + private final Set<ConnConfProperty> configuration; + + private final Set<ConnectorCapability> capabilities; + + private String displayName; + + private Integer connRequestTimeout; + + private ConnPoolConfTO poolConf; + + public ConnInstanceTO() { + super(); + + configuration = new HashSet<ConnConfProperty>(); + capabilities = EnumSet.noneOf(ConnectorCapability.class); + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getLocation() { + return location; + } + + public void setLocation(final String location) { + this.location = location; + } + + public String getConnectorName() { + return connectorName; + } + + public void setConnectorName(final String connectorname) { + this.connectorName = connectorname; + } + + public String getBundleName() { + return bundleName; + } + + public void setBundleName(final String bundlename) { + this.bundleName = bundlename; + } + + public String getVersion() { + return version; + } + + public void setVersion(final String version) { + this.version = version; + } + + @XmlElementWrapper(name = "configuration") + @XmlElement(name = "property") + @JsonProperty("configuration") + public Set<ConnConfProperty> getConfiguration() { + return this.configuration; + } + + @JsonIgnore + public Map<String, ConnConfProperty> getConfigurationMap() { + Map<String, ConnConfProperty> result; + + if (getConfiguration() == null) { + result = Collections.<String, ConnConfProperty>emptyMap(); + } else { + result = new HashMap<String, ConnConfProperty>(); + for (ConnConfProperty prop : getConfiguration()) { + result.put(prop.getSchema().getName(), prop); + } + result = Collections.unmodifiableMap(result); + } + + return result; + } + + @XmlElementWrapper(name = "capabilities") + @XmlElement(name = "capability") + @JsonProperty("capabilities") + public Set<ConnectorCapability> getCapabilities() { + return capabilities; + } + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(final String displayName) { + this.displayName = displayName; + } + + /** + * Get connector request timeout. + * It is not applied in case of sync, full reconciliation and search. + * + * @return timeout. + */ + public Integer getConnRequestTimeout() { + return connRequestTimeout; + } + + /** + * Set connector request timeout. + * It is not applied in case of sync, full reconciliation and search. + * + * @param connRequestTimeout timeout + */ + public void setConnRequestTimeout(final Integer connRequestTimeout) { + this.connRequestTimeout = connRequestTimeout; + } + + public ConnPoolConfTO getPoolConf() { + return poolConf; + } + + public void setPoolConf(final ConnPoolConfTO poolConf) { + this.poolConf = poolConf; + } + +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java Tue Aug 5 11:20:00 2014 @@ -1,58 +1,58 @@ -/* - * 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 com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - -@XmlRootElement(name = "connObject") -@XmlType -public class ConnObjectTO extends AbstractSysInfoTO { - - private static final long serialVersionUID = 5139554911265442497L; - - private final List<AttributeTO> attrs = new ArrayList<AttributeTO>(); - - @XmlElementWrapper(name = "attributes") - @XmlElement(name = "attribute") - @JsonProperty("attributes") - public List<AttributeTO> getAttrs() { - return attrs; - } - - @JsonIgnore - public Map<String, AttributeTO> getAttrMap() { - Map<String, AttributeTO> result = new HashMap<String, AttributeTO>(attrs.size()); - for (AttributeTO attributeTO : attrs) { - result.put(attributeTO.getSchema(), attributeTO); - } - result = Collections.<String, AttributeTO>unmodifiableMap(result); - - return result; - } -} +/* + * 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 com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlRootElement(name = "connObject") +@XmlType +public class ConnObjectTO extends AbstractSysInfoTO { + + private static final long serialVersionUID = 5139554911265442497L; + + private final List<AttributeTO> attrs = new ArrayList<AttributeTO>(); + + @XmlElementWrapper(name = "attributes") + @XmlElement(name = "attribute") + @JsonProperty("attributes") + public List<AttributeTO> getAttrs() { + return attrs; + } + + @JsonIgnore + public Map<String, AttributeTO> getAttrMap() { + Map<String, AttributeTO> result = new HashMap<String, AttributeTO>(attrs.size()); + for (AttributeTO attributeTO : attrs) { + result.put(attributeTO.getSchema(), attributeTO); + } + result = Collections.<String, AttributeTO>unmodifiableMap(result); + + return result; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java Tue Aug 5 11:20:00 2014 @@ -1,39 +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.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; - } -} +/* + * 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; + +@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; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java Tue Aug 5 11:20:00 2014 @@ -1,52 +1,52 @@ -/* - * 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; -import org.apache.syncope.common.types.LoggerLevel; - -@XmlRootElement(name = "logger") -@XmlType -public class LoggerTO extends AbstractBaseBean { - - private static final long serialVersionUID = -7794833835668648505L; - - private String name; - - private LoggerLevel level; - - public LoggerLevel getLevel() { - return level; - } - - public void setLevel(final LoggerLevel level) { - this.level = level; - } - - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } -} +/* + * 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; +import org.apache.syncope.common.types.LoggerLevel; + +@XmlRootElement(name = "logger") +@XmlType +public class LoggerTO extends AbstractBaseBean { + + private static final long serialVersionUID = -7794833835668648505L; + + private String name; + + private LoggerLevel level; + + public LoggerLevel getLevel() { + return level; + } + + public void setLevel(final LoggerLevel level) { + this.level = level; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } +} Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java?rev=1615910&r1=1615909&r2=1615910&view=diff ============================================================================== --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java Tue Aug 5 11:20:00 2014 @@ -1,135 +1,135 @@ -/* - * 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; -import org.apache.syncope.common.types.IntMappingType; -import org.apache.syncope.common.types.MappingPurpose; - -@XmlRootElement(name = "mappingItem") -@XmlType -public class MappingItemTO extends AbstractBaseBean { - - private static final long serialVersionUID = 2983498836767176862L; - - private Long id; - - /** - * Attribute schema to be mapped. Consider that we can associate tha same attribute schema more than once, with - * different aliases, to different resource attributes. - */ - private String intAttrName; - - /** - * Schema type to be mapped. - */ - private IntMappingType intMappingType; - - /** - * External resource's field to be mapped. - */ - private String extAttrName; - - /** - * Specify if the mapped target resource's field is the key. - */ - private boolean accountid; - - /** - * Specify if the mapped target resource's field is the password. - */ - private boolean password; - - /** - * Specify if the mapped target resource's field is nullable. - */ - private String mandatoryCondition = "false"; - - /** - * Mapping purposes: SYNCHRONIZATION, PROPAGATION, BOTH, NONE. - */ - private MappingPurpose purpose; - - public boolean isAccountid() { - return accountid; - } - - public void setAccountid(boolean accountid) { - this.accountid = accountid; - } - - public String getExtAttrName() { - return extAttrName; - } - - public void setExtAttrName(String extAttrName) { - this.extAttrName = extAttrName; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMandatoryCondition() { - return mandatoryCondition; - } - - public void setMandatoryCondition(String mandatoryCondition) { - this.mandatoryCondition = mandatoryCondition; - } - - public boolean isPassword() { - return password; - } - - public void setPassword(boolean password) { - this.password = password; - } - - public String getIntAttrName() { - return intAttrName; - } - - public void setIntAttrName(String intAttrName) { - this.intAttrName = intAttrName; - } - - public IntMappingType getIntMappingType() { - return intMappingType; - } - - public void setIntMappingType(IntMappingType intMappingType) { - this.intMappingType = intMappingType; - } - - public MappingPurpose getPurpose() { - return purpose; - } - - public void setPurpose(MappingPurpose purpose) { - this.purpose = purpose; - } -} +/* + * 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; +import org.apache.syncope.common.types.IntMappingType; +import org.apache.syncope.common.types.MappingPurpose; + +@XmlRootElement(name = "mappingItem") +@XmlType +public class MappingItemTO extends AbstractBaseBean { + + private static final long serialVersionUID = 2983498836767176862L; + + private Long id; + + /** + * Attribute schema to be mapped. Consider that we can associate tha same attribute schema more than once, with + * different aliases, to different resource attributes. + */ + private String intAttrName; + + /** + * Schema type to be mapped. + */ + private IntMappingType intMappingType; + + /** + * External resource's field to be mapped. + */ + private String extAttrName; + + /** + * Specify if the mapped target resource's field is the key. + */ + private boolean accountid; + + /** + * Specify if the mapped target resource's field is the password. + */ + private boolean password; + + /** + * Specify if the mapped target resource's field is nullable. + */ + private String mandatoryCondition = "false"; + + /** + * Mapping purposes: SYNCHRONIZATION, PROPAGATION, BOTH, NONE. + */ + private MappingPurpose purpose; + + public boolean isAccountid() { + return accountid; + } + + public void setAccountid(boolean accountid) { + this.accountid = accountid; + } + + public String getExtAttrName() { + return extAttrName; + } + + public void setExtAttrName(String extAttrName) { + this.extAttrName = extAttrName; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getMandatoryCondition() { + return mandatoryCondition; + } + + public void setMandatoryCondition(String mandatoryCondition) { + this.mandatoryCondition = mandatoryCondition; + } + + public boolean isPassword() { + return password; + } + + public void setPassword(boolean password) { + this.password = password; + } + + public String getIntAttrName() { + return intAttrName; + } + + public void setIntAttrName(String intAttrName) { + this.intAttrName = intAttrName; + } + + public IntMappingType getIntMappingType() { + return intMappingType; + } + + public void setIntMappingType(IntMappingType intMappingType) { + this.intMappingType = intMappingType; + } + + public MappingPurpose getPurpose() { + return purpose; + } + + public void setPurpose(MappingPurpose purpose) { + this.purpose = purpose; + } +}
