http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java new file mode 100644 index 0000000..2968f0e --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java @@ -0,0 +1,38 @@ +/* + * 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.core.persistence.api.dao; + +import java.util.List; +import org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException; +import org.apache.syncope.core.persistence.api.entity.AttributableUtil; +import org.apache.syncope.core.persistence.api.entity.VirAttr; +import org.apache.syncope.core.persistence.api.entity.VirSchema; + +public interface VirSchemaDAO extends DAO<VirSchema, String> { + + <T extends VirSchema> T find(String key, Class<T> reference); + + <T extends VirSchema> List<T> findAll(Class<T> reference); + + <T extends VirAttr> List<T> findAttrs(VirSchema virSchema, Class<T> reference); + + <T extends VirSchema> T save(T virSchema) throws InvalidEntityException; + + void delete(String key, AttributableUtil attributableUtil); +}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AbstractSearchCond.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AbstractSearchCond.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AbstractSearchCond.java new file mode 100644 index 0000000..2087bc7 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AbstractSearchCond.java @@ -0,0 +1,48 @@ +/* + * 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.core.persistence.api.dao.search; + +import java.io.Serializable; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +public abstract class AbstractSearchCond implements Serializable { + + private static final long serialVersionUID = 5376869884544910804L; + + @Override + public boolean equals(final Object obj) { + return EqualsBuilder.reflectionEquals(this, obj); + } + + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } + + @Override + public String toString() { + return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE); + } + + public abstract boolean isValid(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AttributeCond.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AttributeCond.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AttributeCond.java new file mode 100644 index 0000000..92698b2 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/AttributeCond.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.dao.search; + +/** + * Search condition to be applied when comparing attribute values. + */ +public class AttributeCond extends AbstractSearchCond { + + private static final long serialVersionUID = 3275277728404021417L; + + public enum Type { + + LIKE, + EQ, + GT, + LT, + GE, + LE, + ISNULL, + ISNOTNULL + + } + + private Type type; + + private String schema; + + private String expression; + + public AttributeCond() { + super(); + } + + public AttributeCond(final Type conditionType) { + super(); + this.type = conditionType; + } + + public final String getExpression() { + return expression; + } + + public final void setExpression(final String conditionExpression) { + this.expression = conditionExpression; + } + + public final String getSchema() { + return schema; + } + + public final void setSchema(final String conditionSchema) { + this.schema = conditionSchema; + } + + public final Type getType() { + return type; + } + + public final void setType(final Type conditionType) { + this.type = conditionType; + } + + @Override + public final boolean isValid() { + return type != null && schema != null && (type == Type.ISNULL || type == Type.ISNOTNULL || expression != null); + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/EntitlementCond.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/EntitlementCond.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/EntitlementCond.java new file mode 100644 index 0000000..e0711ce --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/EntitlementCond.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.core.persistence.api.dao.search; + +public class EntitlementCond extends AbstractSearchCond { + + private static final long serialVersionUID = -4077781080368377428L; + + private String expression; + + public String getExpression() { + return expression; + } + + public void setExpression(final String expression) { + this.expression = expression; + } + + @Override + public boolean isValid() { + return expression != null; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java new file mode 100644 index 0000000..8f18347 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.dao.search; + +/** + * Search condition to be applied when searching for memberships. + */ +public class MembershipCond extends AbstractSearchCond { + + private static final long serialVersionUID = -728155256293925989L; + + private Long roleId; + + public MembershipCond() { + super(); + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(final Long roleId) { + this.roleId = roleId; + } + + @Override + public final boolean isValid() { + return roleId != null; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/OrderByClause.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/OrderByClause.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/OrderByClause.java new file mode 100644 index 0000000..46a9d80 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/OrderByClause.java @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.dao.search; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +public class OrderByClause { + + public enum Direction { + + ASC, + DESC + + } + + private String field; + + private Direction direction; + + public String getField() { + return field; + } + + public void setField(final String field) { + this.field = field; + } + + public Direction getDirection() { + return direction == null ? Direction.ASC : direction; + } + + public void setDirection(final Direction direction) { + this.direction = direction; + } + + @Override + public boolean equals(final Object obj) { + return EqualsBuilder.reflectionEquals(this, obj); + } + + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } + + @Override + public String toString() { + return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE); + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/ResourceCond.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/ResourceCond.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/ResourceCond.java new file mode 100644 index 0000000..7d9818f --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/ResourceCond.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.dao.search; + +/** + * Search condition to be applied when searching for associated resources. + */ +public class ResourceCond extends AbstractSearchCond { + + private static final long serialVersionUID = 466054166309460002L; + + private String resourceName; + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(final String resourceName) { + this.resourceName = resourceName; + } + + @Override + public final boolean isValid() { + return resourceName != null; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SearchCond.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SearchCond.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SearchCond.java new file mode 100644 index 0000000..0dea6ee --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SearchCond.java @@ -0,0 +1,254 @@ +/* + * 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.core.persistence.api.dao.search; + +import java.util.List; + +public class SearchCond extends AbstractSearchCond { + + private static final long serialVersionUID = 661560782247499526L; + + public enum Type { + + LEAF, + NOT_LEAF, + AND, + OR + + } + + private Type type; + + private SubjectCond subjectCond; + + private AttributeCond attributeCond; + + private MembershipCond membershipCond; + + private ResourceCond resourceCond; + + private EntitlementCond entitlementCond; + + private SearchCond leftNodeCond; + + private SearchCond rightNodeCond; + + public static SearchCond getLeafCond(final AttributeCond attributeCond) { + SearchCond nodeCond = new SearchCond(); + + nodeCond.type = Type.LEAF; + if (attributeCond instanceof SubjectCond) { + nodeCond.subjectCond = (SubjectCond) attributeCond; + } else { + nodeCond.attributeCond = attributeCond; + } + + return nodeCond; + } + + public static SearchCond getLeafCond(final MembershipCond membershipCond) { + SearchCond nodeCond = new SearchCond(); + + nodeCond.type = Type.LEAF; + nodeCond.membershipCond = membershipCond; + + return nodeCond; + } + + public static SearchCond getLeafCond(final ResourceCond resourceCond) { + SearchCond nodeCond = new SearchCond(); + + nodeCond.type = Type.LEAF; + nodeCond.resourceCond = resourceCond; + + return nodeCond; + } + + public static SearchCond getLeafCond(final EntitlementCond entitlementCond) { + SearchCond nodeCond = new SearchCond(); + + nodeCond.type = Type.LEAF; + nodeCond.entitlementCond = entitlementCond; + + return nodeCond; + } + + public static SearchCond getNotLeafCond(final AttributeCond attributeCond) { + SearchCond nodeCond = getLeafCond(attributeCond); + nodeCond.type = Type.NOT_LEAF; + return nodeCond; + } + + public static SearchCond getNotLeafCond(final MembershipCond membershipCond) { + SearchCond nodeCond = getLeafCond(membershipCond); + nodeCond.type = Type.NOT_LEAF; + return nodeCond; + } + + public static SearchCond getNotLeafCond(final ResourceCond resourceCond) { + SearchCond nodeCond = getLeafCond(resourceCond); + nodeCond.type = Type.NOT_LEAF; + return nodeCond; + } + + public static SearchCond getNotLeafCond(final EntitlementCond entitlementCond) { + SearchCond nodeCond = getLeafCond(entitlementCond); + nodeCond.type = Type.NOT_LEAF; + return nodeCond; + } + + public static SearchCond getNotLeafCond(final SearchCond nodeCond) { + nodeCond.type = Type.NOT_LEAF; + return nodeCond; + } + + public static SearchCond getAndCond(final SearchCond leftCond, final SearchCond rightCond) { + SearchCond nodeCond = new SearchCond(); + + nodeCond.type = Type.AND; + nodeCond.leftNodeCond = leftCond; + nodeCond.rightNodeCond = rightCond; + + return nodeCond; + } + + public static SearchCond getAndCond(final List<SearchCond> conditions) { + if (conditions.size() > 2) { + SearchCond removed = conditions.remove(0); + return getAndCond(removed, getAndCond(conditions)); + } else { + return getAndCond(conditions.get(0), conditions.get(1)); + } + } + + public static SearchCond getOrCond(final SearchCond leftCond, final SearchCond rightCond) { + SearchCond nodeCond = new SearchCond(); + + nodeCond.type = Type.OR; + nodeCond.leftNodeCond = leftCond; + nodeCond.rightNodeCond = rightCond; + + return nodeCond; + } + + public static SearchCond getOrCond(final List<SearchCond> conditions) { + if (conditions.size() > 2) { + SearchCond removed = conditions.remove(0); + return getOrCond(removed, getOrCond(conditions)); + } else { + return getOrCond(conditions.get(0), conditions.get(1)); + } + } + + public SubjectCond getSubjectCond() { + return subjectCond; + } + + public void setSubjectCond(final SubjectCond subjectCond) { + this.subjectCond = subjectCond; + } + + public AttributeCond getAttributeCond() { + return attributeCond; + } + + public void setAttributeCond(final AttributeCond attributeCond) { + this.attributeCond = attributeCond; + } + + public MembershipCond getMembershipCond() { + return membershipCond; + } + + public void setMembershipCond(final MembershipCond membershipCond) { + this.membershipCond = membershipCond; + } + + public ResourceCond getResourceCond() { + return resourceCond; + } + + public void setResourceCond(final ResourceCond resourceCond) { + this.resourceCond = resourceCond; + } + + public EntitlementCond getEntitlementCond() { + return entitlementCond; + } + + public void setEntitlementCond(final EntitlementCond entitlementCond) { + this.entitlementCond = entitlementCond; + } + + public SearchCond getLeftNodeCond() { + return leftNodeCond; + } + + public void setLeftNodeCond(final SearchCond leftNodeCond) { + this.leftNodeCond = leftNodeCond; + } + + public SearchCond getRightNodeCond() { + return rightNodeCond; + } + + public void setRightNodeCond(final SearchCond rightNodeCond) { + this.rightNodeCond = rightNodeCond; + } + + public Type getType() { + return type; + } + + public void setType(final Type type) { + this.type = type; + } + + public boolean isValid() { + boolean isValid = false; + + if (type == null) { + return isValid; + } + + switch (type) { + case LEAF: + case NOT_LEAF: + isValid = (subjectCond != null || attributeCond != null || membershipCond != null + || resourceCond != null || entitlementCond != null) + && (subjectCond == null || subjectCond.isValid()) + && (attributeCond == null || attributeCond.isValid()) + && (membershipCond == null || membershipCond.isValid()) + && (resourceCond == null || resourceCond.isValid()) + && (entitlementCond == null || entitlementCond.isValid()); + break; + + case AND: + case OR: + isValid = (leftNodeCond == null || rightNodeCond == null) + ? false + : leftNodeCond.isValid() && rightNodeCond.isValid(); + break; + + default: + } + + return isValid; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java new file mode 100644 index 0000000..b612293 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.dao.search; + +/** + * Search condition to be applied when comparing bean field values. + */ +public class SubjectCond extends AttributeCond { + + private static final long serialVersionUID = -1880319220462653955L; + + public SubjectCond() { + } + + public SubjectCond(final Type conditionType) { + super(conditionType); + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AccountPolicy.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AccountPolicy.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AccountPolicy.java new file mode 100644 index 0000000..e09aa2e --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AccountPolicy.java @@ -0,0 +1,32 @@ +/* + * 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.core.persistence.api.entity; + +import java.util.Set; + +public interface AccountPolicy extends Policy { + + boolean addResource(ExternalResource resource); + + boolean removeResource(ExternalResource resource); + + Set<String> getResourceNames(); + + Set<? extends ExternalResource> getResources(); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AnnotatedEntity.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AnnotatedEntity.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AnnotatedEntity.java new file mode 100644 index 0000000..2847d74 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AnnotatedEntity.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.core.persistence.api.entity; + +import java.util.Date; + +public interface AnnotatedEntity<KEY> extends Entity<KEY> { + + Date getCreationDate(); + + String getCreator(); + + Date getLastChangeDate(); + + String getLastModifier(); + + void setCreationDate(Date creationDate); + + void setCreator(String creator); + + void setLastChangeDate(Date lastChangeDate); + + void setLastModifier(String lastModifier); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attr.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attr.java new file mode 100644 index 0000000..144962e --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attr.java @@ -0,0 +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.core.persistence.api.entity; + +public interface Attr<S extends Schema> extends Entity<Long> { + + Attributable<?, ?, ?> getOwner(); + + void setOwner(Attributable<?, ?, ?> owner); + + S getSchema(); + + void setSchema(S schema); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java new file mode 100644 index 0000000..26397e0 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java @@ -0,0 +1,32 @@ +/* + * 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.core.persistence.api.entity; + +import org.apache.syncope.core.persistence.api.entity.role.Role; + +public interface AttrTemplate<S extends Schema> extends Entity<Long> { + + Role getOwner(); + + void setOwner(Role role); + + S getSchema(); + + void setSchema(S schema); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attributable.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attributable.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attributable.java new file mode 100644 index 0000000..e89181c --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Attributable.java @@ -0,0 +1,48 @@ +/* + * 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.core.persistence.api.entity; + +import java.util.List; + +public interface Attributable<P extends PlainAttr, D extends DerAttr, V extends VirAttr> extends AnnotatedEntity<Long> { + + boolean addPlainAttr(P attr); + + boolean addDerAttr(D derAttr); + + boolean addVirAttr(V virAttr); + + boolean removePlainAttr(P attr); + + boolean removeDerAttr(D derAttr); + + boolean removeVirAttr(V virAttr); + + P getPlainAttr(String plainSchemaName); + + List<? extends P> getPlainAttrs(); + + D getDerAttr(String derSchemaName); + + List<? extends D> getDerAttrs(); + + V getVirAttr(String virSchemaName); + + List<? extends V> getVirAttrs(); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtil.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtil.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtil.java new file mode 100644 index 0000000..0b7107d --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtil.java @@ -0,0 +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.core.persistence.api.entity; + +import java.util.List; +import org.apache.syncope.common.lib.to.AbstractAttributableTO; +import org.apache.syncope.common.lib.to.AbstractSubjectTO; +import org.apache.syncope.common.lib.types.AttributableType; +import org.apache.syncope.common.lib.types.IntMappingType; +import org.apache.syncope.common.lib.types.MappingPurpose; + +public interface AttributableUtil { + + AttributableType getType(); + + <T extends Attributable<?, ?, ?>> Class<T> attributableClass(); + + <T extends PlainSchema> Class<T> plainSchemaClass(); + + <T extends PlainSchema> T newPlainSchema(); + + <T extends PlainAttr> Class<T> plainAttrClass(); + + <T extends PlainAttr> T newPlainAttr(); + + <T extends PlainAttrValue> Class<T> plainAttrValueClass(); + + <T extends PlainAttrValue> T newPlainAttrValue(); + + <T extends AttrTemplate<PlainSchema>> Class<T> plainAttrTemplateClass(); + + <T extends PlainAttrValue> Class<T> plainAttrUniqueValueClass(); + + <T extends PlainAttrValue> T newPlainAttrUniqueValue(); + + <T extends DerSchema> Class<T> derSchemaClass(); + + <T extends DerSchema> T newDerSchema(); + + <T extends DerAttr> Class<T> derAttrClass(); + + <T extends DerAttr> T newDerAttr(); + + <T extends AttrTemplate<DerSchema>> Class<T> derAttrTemplateClass(); + + <T extends VirSchema> Class<T> virSchemaClass(); + + <T extends VirSchema> T newVirSchema(); + + <T extends VirAttr> Class<T> virAttrClass(); + + <T extends VirAttr> T newVirAttr(); + + <T extends AttrTemplate<VirSchema>> Class<T> virAttrTemplateClass(); + + <T extends MappingItem> T getAccountIdItem(ExternalResource resource); + + String getAccountLink(ExternalResource resource); + + <T extends MappingItem> List<T> getMappingItems(ExternalResource resource, MappingPurpose purpose); + + <T extends MappingItem> List<T> getUidToMappingItems(ExternalResource resource, MappingPurpose purpose); + + IntMappingType intMappingType(); + + IntMappingType derIntMappingType(); + + IntMappingType virIntMappingType(); + + <T extends MappingItem> Class<T> mappingItemClass(); + + <T extends AbstractAttributableTO> T newAttributableTO(); + + <T extends AbstractSubjectTO> T newSubjectTO(); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtilFactory.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtilFactory.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtilFactory.java new file mode 100644 index 0000000..8eaf78e --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttributableUtilFactory.java @@ -0,0 +1,33 @@ +/* + * 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.core.persistence.api.entity; + +import org.apache.syncope.common.lib.types.AttributableType; +import org.identityconnectors.framework.common.objects.ObjectClass; + +public interface AttributableUtilFactory { + + AttributableUtil getInstance(AttributableType type); + + AttributableUtil getInstance(String attributableType); + + AttributableUtil getInstance(ObjectClass objectClass); + + AttributableUtil getInstance(Attributable<?, ?, ?> attributable); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnInstance.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnInstance.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnInstance.java new file mode 100644 index 0000000..88e8b00 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnInstance.java @@ -0,0 +1,71 @@ +/* + * 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.core.persistence.api.entity; + +import java.util.List; +import java.util.Set; +import org.apache.syncope.common.lib.types.ConnConfProperty; +import org.apache.syncope.common.lib.types.ConnectorCapability; + +public interface ConnInstance extends Entity<Long> { + + boolean addCapability(ConnectorCapability capabitily); + + boolean addResource(ExternalResource resource); + + String getBundleName(); + + Set<ConnectorCapability> getCapabilities(); + + Set<ConnConfProperty> getConfiguration(); + + Integer getConnRequestTimeout(); + + String getConnectorName(); + + String getDisplayName(); + + String getLocation(); + + ConnPoolConf getPoolConf(); + + List<? extends ExternalResource> getResources(); + + String getVersion(); + + boolean removeCapability(ConnectorCapability capabitily); + + boolean removeResource(ExternalResource resource); + + void setBundleName(String bundleName); + + void setConfiguration(Set<ConnConfProperty> configuration); + + void setConnRequestTimeout(Integer timeout); + + void setConnectorName(String connectorName); + + void setDisplayName(String displayName); + + void setLocation(String location); + + void setPoolConf(ConnPoolConf poolConf); + + void setVersion(String version); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnPoolConf.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnPoolConf.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnPoolConf.java new file mode 100644 index 0000000..7148be3 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ConnPoolConf.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +public interface ConnPoolConf { + + Integer getMaxObjects(); + + void setMaxObjects(Integer maxObjects); + + Integer getMinIdle(); + + void setMinIdle(Integer minIdle); + + Integer getMaxIdle(); + + void setMaxIdle(Integer maxIdle); + + Long getMaxWait(); + + void setMaxWait(Long maxWait); + + Long getMinEvictableIdleTimeMillis(); + + void setMinEvictableIdleTimeMillis(Long minEvictableIdleTimeMillis); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerAttr.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerAttr.java new file mode 100644 index 0000000..3857f9e --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerAttr.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +import java.util.Collection; + +public interface DerAttr extends Attr<DerSchema> { + + String getValue(Collection<? extends PlainAttr> attrs); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerSchema.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerSchema.java new file mode 100644 index 0000000..92b4556 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/DerSchema.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +public interface DerSchema extends Schema { + + String getExpression(); + + void setExpression(String expression); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entitlement.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entitlement.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entitlement.java new file mode 100644 index 0000000..7f0b451 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entitlement.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +public interface Entitlement extends Entity<String> { + + String getDescription(); + + void setKey(String key); + + void setDescription(String description); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entity.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entity.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entity.java new file mode 100644 index 0000000..8f7934a --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Entity.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +import java.io.Serializable; + +public interface Entity<KEY> extends Serializable { + + KEY getKey(); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/EntityFactory.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/EntityFactory.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/EntityFactory.java new file mode 100644 index 0000000..f827703 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/EntityFactory.java @@ -0,0 +1,28 @@ +package org.apache.syncope.core.persistence.api.entity; + +/* + * 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. + */ +public interface EntityFactory { + + <KEY, T extends Entity<KEY>> T newEntity(Class<T> reference); + + <T extends Policy> T newPolicy(Class<T> reference, boolean global); + + ConnPoolConf newConnPoolConf(); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Exec.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Exec.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Exec.java new file mode 100644 index 0000000..461b59f --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Exec.java @@ -0,0 +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.core.persistence.api.entity; + +import java.util.Date; + +public interface Exec extends Entity<Long> { + + Date getEndDate(); + + String getMessage(); + + Date getStartDate(); + + String getStatus(); + + void setEndDate(Date endDate); + + /** + * Set a message for this execution, taking care of replacing every null character with newline. + * + * @param message the message to set for this execution + */ + void setMessage(String message); + + void setStartDate(Date startDate); + + void setStatus(String status); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java new file mode 100644 index 0000000..e61bda2 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java @@ -0,0 +1,111 @@ +/* + * 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.core.persistence.api.entity; + +import org.apache.syncope.core.persistence.api.entity.user.UMapping; +import org.apache.syncope.core.persistence.api.entity.role.RMapping; +import java.util.List; +import java.util.Set; +import org.apache.syncope.common.lib.types.ConnConfProperty; +import org.apache.syncope.common.lib.types.PropagationMode; +import org.apache.syncope.common.lib.types.TraceLevel; +import org.identityconnectors.framework.common.objects.SyncToken; + +public interface ExternalResource extends AnnotatedEntity<String> { + + AccountPolicy getAccountPolicy(); + + PasswordPolicy getPasswordPolicy(); + + SyncPolicy getSyncPolicy(); + + Set<ConnConfProperty> getConnInstanceConfiguration(); + + ConnInstance getConnector(); + + TraceLevel getCreateTraceLevel(); + + TraceLevel getUpdateTraceLevel(); + + TraceLevel getDeleteTraceLevel(); + + TraceLevel getSyncTraceLevel(); + + List<String> getPropagationActionsClassNames(); + + PropagationMode getPropagationMode(); + + Integer getPropagationPriority(); + + UMapping getUmapping(); + + RMapping getRmapping(); + + SyncToken getUsyncToken(); + + String getSerializedUSyncToken(); + + SyncToken getRsyncToken(); + + String getSerializedRSyncToken(); + + boolean isEnforceMandatoryCondition(); + + boolean isPropagationPrimary(); + + boolean isRandomPwdIfNotProvided(); + + void setKey(String name); + + void setAccountPolicy(AccountPolicy accountPolicy); + + void setPasswordPolicy(PasswordPolicy passwordPolicy); + + void setSyncPolicy(SyncPolicy syncPolicy); + + void setConnInstanceConfiguration(Set<ConnConfProperty> properties); + + void setConnector(ConnInstance connector); + + void setCreateTraceLevel(TraceLevel createTraceLevel); + + void setUpdateTraceLevel(TraceLevel updateTraceLevel); + + void setDeleteTraceLevel(TraceLevel deleteTraceLevel); + + void setSyncTraceLevel(TraceLevel syncTraceLevel); + + void setPropagationMode(PropagationMode propagationMode); + + void setPropagationPriority(Integer priority); + + void setUmapping(UMapping umapping); + + void setRmapping(RMapping rmapping); + + void setEnforceMandatoryCondition(boolean enforce); + + void setPropagationPrimary(boolean condition); + + void setRandomPwdIfNotProvided(boolean condition); + + void setUsyncToken(SyncToken syncToken); + + void setRsyncToken(SyncToken syncToken); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Logger.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Logger.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Logger.java new file mode 100644 index 0000000..6206e95 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Logger.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +import org.apache.syncope.common.lib.types.LoggerLevel; +import org.apache.syncope.common.lib.types.LoggerType; + +public interface Logger extends Entity<String> { + + void setKey(String name); + + LoggerLevel getLevel(); + + void setLevel(LoggerLevel level); + + LoggerType getType(); + + void setType(LoggerType type); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Mapping.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Mapping.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Mapping.java new file mode 100644 index 0000000..fb491fa --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Mapping.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +import java.util.List; + +public interface Mapping<T extends MappingItem> extends Entity<Long> { + + T getAccountIdItem(); + + String getAccountLink(); + + List<? extends T> getItems(); + + ExternalResource getResource(); + + boolean addItem(T item); + + boolean removeItem(T item); + + void setAccountIdItem(T item); + + void setAccountLink(String accountLink); + + void setResource(ExternalResource resource); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/MappingItem.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/MappingItem.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/MappingItem.java new file mode 100644 index 0000000..ec6919e --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/MappingItem.java @@ -0,0 +1,57 @@ +/* + * 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.core.persistence.api.entity; + +import org.apache.syncope.common.lib.types.IntMappingType; +import org.apache.syncope.common.lib.types.MappingPurpose; + +public interface MappingItem extends Entity<Long> { + + String getExtAttrName(); + + String getIntAttrName(); + + IntMappingType getIntMappingType(); + + String getMandatoryCondition(); + + Mapping<?> getMapping(); + + MappingPurpose getPurpose(); + + boolean isAccountid(); + + boolean isPassword(); + + void setAccountid(boolean accountid); + + void setExtAttrName(String extAttrName); + + void setIntAttrName(String intAttrName); + + void setIntMappingType(IntMappingType intMappingType); + + void setMandatoryCondition(String condition); + + void setMapping(Mapping<?> mapping); + + void setPassword(boolean password); + + void setPurpose(MappingPurpose purpose); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java new file mode 100644 index 0000000..104cf12 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java @@ -0,0 +1,82 @@ +/* + * 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.core.persistence.api.entity; + +import java.util.List; +import org.apache.syncope.common.lib.types.IntMappingType; +import org.apache.syncope.common.lib.types.TraceLevel; + +public interface Notification extends Entity<Long> { + + boolean addEvent(String event); + + boolean addStaticRecipient(String staticRecipient); + + List<String> getEvents(); + + String getRecipientAttrName(); + + IntMappingType getRecipientAttrType(); + + String getRecipients(); + + String getRoleAbout(); + + String getSender(); + + List<String> getStaticRecipients(); + + String getSubject(); + + String getTemplate(); + + TraceLevel getTraceLevel(); + + String getUserAbout(); + + boolean isActive(); + + boolean isSelfAsRecipient(); + + boolean removeEvent(String event); + + boolean removeStaticRecipient(String staticRecipient); + + void setActive(boolean active); + + void setRecipientAttrName(String recipientAttrName); + + void setRecipientAttrType(IntMappingType recipientAttrType); + + void setRecipients(String recipients); + + void setRoleAbout(String roleAbout); + + void setSelfAsRecipient(boolean selfAsRecipient); + + void setSender(String sender); + + void setSubject(String subject); + + void setTemplate(String template); + + void setTraceLevel(TraceLevel traceLevel); + + void setUserAbout(String userAbout); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PasswordPolicy.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PasswordPolicy.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PasswordPolicy.java new file mode 100644 index 0000000..4981ff2 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PasswordPolicy.java @@ -0,0 +1,23 @@ +/* + * 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.core.persistence.api.entity; + +public interface PasswordPolicy extends Policy { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java new file mode 100644 index 0000000..4250f2e --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +import java.util.List; +import org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidPlainAttrValueException; + +public interface PlainAttr extends Attr<PlainSchema> { + + void addValue(String value, AttributableUtil attributableUtil) throws InvalidPlainAttrValueException; + + boolean removeValue(PlainAttrValue attrValue); + + PlainAttrUniqueValue getUniqueValue(); + + List<? extends PlainAttrValue> getValues(); + + List<String> getValuesAsStrings(); + + void setUniqueValue(PlainAttrUniqueValue uniqueValue); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrUniqueValue.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrUniqueValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrUniqueValue.java new file mode 100644 index 0000000..ba711a6 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrUniqueValue.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +public interface PlainAttrUniqueValue extends PlainAttrValue { + + PlainSchema getSchema(); + + void setSchema(PlainSchema schema); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java new file mode 100644 index 0000000..fffeb29 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java @@ -0,0 +1,62 @@ +/* + * 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.core.persistence.api.entity; + +import java.util.Date; +import org.apache.syncope.common.lib.types.AttrSchemaType; +import org.apache.syncope.core.persistence.api.attrvalue.validation.ParsingValidationException; + +public interface PlainAttrValue extends Entity<Long> { + + PlainAttr getAttr(); + + byte[] getBinaryValue(); + + Boolean getBooleanValue(); + + Date getDateValue(); + + Double getDoubleValue(); + + Long getLongValue(); + + String getStringValue(); + + <V> V getValue(); + + String getValueAsString(); + + String getValueAsString(AttrSchemaType type); + + void parseValue(PlainSchema schema, String value) throws ParsingValidationException; + + void setAttr(PlainAttr attr); + + void setBinaryValue(byte[] binaryValue); + + void setBooleanValue(Boolean booleanValue); + + void setDateValue(Date dateValue); + + void setDoubleValue(Double doubleValue); + + void setLongValue(Long longValue); + + void setStringValue(String stringValue); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainSchema.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainSchema.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainSchema.java new file mode 100644 index 0000000..82ae012 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainSchema.java @@ -0,0 +1,67 @@ +/* + * 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.core.persistence.api.entity; + +import org.apache.syncope.common.lib.types.AttrSchemaType; +import org.apache.syncope.common.lib.types.CipherAlgorithm; +import org.apache.syncope.core.persistence.api.attrvalue.validation.Validator; + +public interface PlainSchema extends Schema { + + CipherAlgorithm getCipherAlgorithm(); + + String getConversionPattern(); + + String getEnumerationKeys(); + + String getEnumerationValues(); + + String getMimeType(); + + String getSecretKey(); + + Validator getValidator(); + + String getValidatorClass(); + + void setCipherAlgorithm(CipherAlgorithm cipherAlgorithm); + + void setConversionPattern(String conversionPattern); + + void setEnumerationKeys(String enumerationKeys); + + void setEnumerationValues(String enumerationValues); + + void setMimeType(String mimeType); + + void setSecretKey(String secretKey); + + void setValidatorClass(String validatorClass); + + void setType(AttrSchemaType type); + + void setMandatoryCondition(String condition); + + void setMultivalue(boolean multivalue); + + void setReadonly(boolean readonly); + + void setUniqueConstraint(boolean uniquevalue); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Policy.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Policy.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Policy.java new file mode 100644 index 0000000..5edca88 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Policy.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +import org.apache.syncope.common.lib.types.PolicySpec; +import org.apache.syncope.common.lib.types.PolicyType; + +public interface Policy extends Entity<Long> { + + String getDescription(); + + <T extends PolicySpec> T getSpecification(Class<T> reference); + + PolicyType getType(); + + void setDescription(String description); + + void setSpecification(PolicySpec policy); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PushPolicy.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PushPolicy.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PushPolicy.java new file mode 100644 index 0000000..761525d --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PushPolicy.java @@ -0,0 +1,23 @@ +/* + * 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.core.persistence.api.entity; + +public interface PushPolicy extends Policy { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Report.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Report.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Report.java new file mode 100644 index 0000000..a2605e7 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Report.java @@ -0,0 +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.core.persistence.api.entity; + +import java.util.List; +import org.apache.syncope.common.lib.report.ReportletConf; + +public interface Report extends Entity<Long> { + + String getName(); + + boolean addExec(ReportExec exec); + + boolean addReportletConf(ReportletConf reportletConf); + + String getCronExpression(); + + List<? extends ReportExec> getExecs(); + + List<? extends ReportletConf> getReportletConfs(); + + boolean removeExec(ReportExec exec); + + boolean removeReportletConf(ReportletConf reportletConf); + + void setCronExpression(String cronExpression); + + void setName(String name); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportExec.java ---------------------------------------------------------------------- diff --git a/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportExec.java b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportExec.java new file mode 100644 index 0000000..0607fd6 --- /dev/null +++ b/syncope620/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ReportExec.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity; + +import org.apache.syncope.common.lib.types.ReportExecStatus; + +public interface ReportExec extends Exec { + + byte[] getExecResult(); + + Report getReport(); + + void setExecResult(byte[] execResult); + + void setReport(Report report); + + void setStatus(ReportExecStatus status); +}
