http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/UserDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/UserDAO.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/UserDAO.java index 32d23fc..adc0a36 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/UserDAO.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/UserDAO.java @@ -21,7 +21,6 @@ package org.apache.syncope.core.persistence.api.dao; import java.util.List; import java.util.Set; import org.apache.syncope.core.persistence.api.dao.search.OrderByClause; -import org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException; import org.apache.syncope.core.persistence.api.entity.ExternalResource; import org.apache.syncope.core.persistence.api.entity.user.SecurityQuestion; import org.apache.syncope.core.persistence.api.entity.user.UDerAttr; @@ -50,13 +49,13 @@ public interface UserDAO extends SubjectDAO<UPlainAttr, UDerAttr, UVirAttr> { List<User> findByResource(ExternalResource resource); - List<User> findAll(Set<Long> adminRoles, int page, int itemsPerPage); + List<User> findAll(Set<Long> adminGroups, int page, int itemsPerPage); - List<User> findAll(Set<Long> adminRoles, int page, int itemsPerPage, List<OrderByClause> orderBy); + List<User> findAll(Set<Long> adminGroups, int page, int itemsPerPage, List<OrderByClause> orderBy); - int count(Set<Long> adminRoles); + int count(Set<Long> adminGroups); - User save(User user) throws InvalidEntityException; + User save(User user); void delete(Long key);
http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirAttrDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirAttrDAO.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirAttrDAO.java index 2c4e1cc..254372a 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirAttrDAO.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirAttrDAO.java @@ -19,7 +19,6 @@ 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.VirAttr; public interface VirAttrDAO extends DAO<VirAttr, Long> { @@ -28,7 +27,7 @@ public interface VirAttrDAO extends DAO<VirAttr, Long> { <T extends VirAttr> List<T> findAll(Class<T> reference); - <T extends VirAttr> T save(T virtualAttribute) throws InvalidEntityException; + <T extends VirAttr> T save(T virtualAttribute); <T extends VirAttr> void delete(Long key, Class<T> reference); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java index 2968f0e..149ef97 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/VirSchemaDAO.java @@ -19,7 +19,6 @@ 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; @@ -32,7 +31,7 @@ public interface VirSchemaDAO extends DAO<VirSchema, String> { <T extends VirAttr> List<T> findAttrs(VirSchema virSchema, Class<T> reference); - <T extends VirSchema> T save(T virSchema) throws InvalidEntityException; + <T extends VirSchema> T save(T virSchema); void delete(String key, AttributableUtil attributableUtil); } http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java index 8f18347..6cbc6b3 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/MembershipCond.java @@ -25,22 +25,18 @@ public class MembershipCond extends AbstractSearchCond { private static final long serialVersionUID = -728155256293925989L; - private Long roleId; + private Long groupId; - public MembershipCond() { - super(); + public Long getGroupId() { + return groupId; } - public Long getRoleId() { - return roleId; - } - - public void setRoleId(final Long roleId) { - this.roleId = roleId; + public void setGroupId(final Long groupId) { + this.groupId = groupId; } @Override public final boolean isValid() { - return roleId != null; + return groupId != null; } } http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java index b612293..48e762f 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SubjectCond.java @@ -26,6 +26,7 @@ public class SubjectCond extends AttributeCond { private static final long serialVersionUID = -1880319220462653955L; public SubjectCond() { + super(); } public SubjectCond(final Type conditionType) { http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java index 26397e0..6aaf916 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/AttrTemplate.java @@ -18,13 +18,13 @@ */ package org.apache.syncope.core.persistence.api.entity; -import org.apache.syncope.core.persistence.api.entity.role.Role; +import org.apache.syncope.core.persistence.api.entity.group.Group; public interface AttrTemplate<S extends Schema> extends Entity<Long> { - Role getOwner(); + Group getOwner(); - void setOwner(Role role); + void setOwner(Group group); S getSchema(); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java index e61bda2..c221f41 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/ExternalResource.java @@ -19,7 +19,7 @@ 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 org.apache.syncope.core.persistence.api.entity.group.GMapping; import java.util.List; import java.util.Set; import org.apache.syncope.common.lib.types.ConnConfProperty; @@ -55,7 +55,7 @@ public interface ExternalResource extends AnnotatedEntity<String> { UMapping getUmapping(); - RMapping getRmapping(); + GMapping getGmapping(); SyncToken getUsyncToken(); @@ -97,7 +97,7 @@ public interface ExternalResource extends AnnotatedEntity<String> { void setUmapping(UMapping umapping); - void setRmapping(RMapping rmapping); + void setGmapping(GMapping gmapping); void setEnforceMandatoryCondition(boolean enforce); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java index 104cf12..0c55b14 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Notification.java @@ -36,7 +36,7 @@ public interface Notification extends Entity<Long> { String getRecipients(); - String getRoleAbout(); + String getGroupAbout(); String getSender(); @@ -66,7 +66,7 @@ public interface Notification extends Entity<Long> { void setRecipients(String recipients); - void setRoleAbout(String roleAbout); + void setGroupAbout(String groupAbout); void setSelfAsRecipient(boolean selfAsRecipient); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java index 4250f2e..11e33b5 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttr.java @@ -19,11 +19,10 @@ 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; + void addValue(String value, AttributableUtil attributableUtil); boolean removeValue(PlainAttrValue attrValue); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java index fffeb29..7735d4c 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/PlainAttrValue.java @@ -20,7 +20,6 @@ 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> { @@ -44,7 +43,7 @@ public interface PlainAttrValue extends Entity<Long> { String getValueAsString(AttrSchemaType type); - void parseValue(PlainSchema schema, String value) throws ParsingValidationException; + void parseValue(PlainSchema schema, String value); void setAttr(PlainAttr attr); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttr.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttr.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttr.java new file mode 100644 index 0000000..59e665f --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttr.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.group; + +import org.apache.syncope.core.persistence.api.entity.DerAttr; + +public interface GDerAttr extends DerAttr { + + @Override + Group getOwner(); + + @Override + GDerSchema getSchema(); + + GDerAttrTemplate getTemplate(); + + void setTemplate(GDerAttrTemplate template); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttrTemplate.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttrTemplate.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttrTemplate.java new file mode 100644 index 0000000..ee92c6c --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerAttrTemplate.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.AttrTemplate; + +public interface GDerAttrTemplate extends AttrTemplate<GDerSchema> { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerSchema.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerSchema.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerSchema.java new file mode 100644 index 0000000..ef67148 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GDerSchema.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.DerSchema; + +public interface GDerSchema extends DerSchema { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMapping.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMapping.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMapping.java new file mode 100644 index 0000000..b8105f3 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMapping.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.Mapping; + +public interface GMapping extends Mapping<GMappingItem> { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMappingItem.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMappingItem.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMappingItem.java new file mode 100644 index 0000000..3e1c126 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GMappingItem.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.group; + +import org.apache.syncope.core.persistence.api.entity.Mapping; +import org.apache.syncope.core.persistence.api.entity.MappingItem; + +public interface GMappingItem extends MappingItem { + + @Override + Mapping<GMappingItem> getMapping(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttr.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttr.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttr.java new file mode 100644 index 0000000..cf3f551 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttr.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.group; + +import java.util.List; +import org.apache.syncope.core.persistence.api.entity.PlainAttr; + +public interface GPlainAttr extends PlainAttr { + + @Override + Group getOwner(); + + @Override + GPlainSchema getSchema(); + + GPlainAttrTemplate getTemplate(); + + void setTemplate(GPlainAttrTemplate template); + + @Override + List<? extends GPlainAttrValue> getValues(); + + @Override + GPlainAttrUniqueValue getUniqueValue(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrTemplate.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrTemplate.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrTemplate.java new file mode 100644 index 0000000..c619c72 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrTemplate.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.AttrTemplate; + +public interface GPlainAttrTemplate extends AttrTemplate<GPlainSchema> { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrUniqueValue.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrUniqueValue.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrUniqueValue.java new file mode 100644 index 0000000..2ce9285 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrUniqueValue.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.PlainAttrUniqueValue; + +public interface GPlainAttrUniqueValue extends PlainAttrUniqueValue { + + @Override + GPlainAttr getAttr(); + + @Override + GPlainSchema getSchema(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrValue.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrValue.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrValue.java new file mode 100644 index 0000000..d63a38c --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainAttrValue.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.PlainAttrValue; + +public interface GPlainAttrValue extends PlainAttrValue { + + @Override + GPlainAttr getAttr(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainSchema.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainSchema.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainSchema.java new file mode 100644 index 0000000..f50dcfd --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GPlainSchema.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.PlainSchema; + +public interface GPlainSchema extends PlainSchema { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttr.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttr.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttr.java new file mode 100644 index 0000000..9ef9f4a --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttr.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.group; + +import org.apache.syncope.core.persistence.api.entity.VirAttr; + +public interface GVirAttr extends VirAttr { + + @Override + Group getOwner(); + + @Override + GVirSchema getSchema(); + + GVirAttrTemplate getTemplate(); + + void setTemplate(GVirAttrTemplate template); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttrTemplate.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttrTemplate.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttrTemplate.java new file mode 100644 index 0000000..478a255 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirAttrTemplate.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.AttrTemplate; + +public interface GVirAttrTemplate extends AttrTemplate<GVirSchema> { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirSchema.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirSchema.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirSchema.java new file mode 100644 index 0000000..52a65c7 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/GVirSchema.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.core.persistence.api.entity.group; + +import org.apache.syncope.core.persistence.api.entity.VirSchema; + +public interface GVirSchema extends VirSchema { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/Group.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/Group.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/Group.java new file mode 100644 index 0000000..3c9f5df --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/group/Group.java @@ -0,0 +1,168 @@ +/* + * 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.group; + +import java.util.List; +import java.util.Set; +import org.apache.syncope.core.persistence.api.entity.AccountPolicy; +import org.apache.syncope.core.persistence.api.entity.AttrTemplate; +import org.apache.syncope.core.persistence.api.entity.Entitlement; +import org.apache.syncope.core.persistence.api.entity.PasswordPolicy; +import org.apache.syncope.core.persistence.api.entity.Schema; +import org.apache.syncope.core.persistence.api.entity.Subject; +import org.apache.syncope.core.persistence.api.entity.user.User; + +public interface Group extends Subject<GPlainAttr, GDerAttr, GVirAttr> { + + String getName(); + + Group getParent(); + + boolean addEntitlement(Entitlement entitlement); + + boolean removeEntitlement(Entitlement entitlement); + + /** + * Get all inherited attributes from the ancestors. + * + * @return a list of inherited and only inherited attributes. + */ + List<? extends GPlainAttr> findLastInheritedAncestorPlainAttrs(); + + /** + * Get all inherited derived attributes from the ancestors. + * + * @return a list of inherited and only inherited attributes. + */ + List<? extends GDerAttr> findLastInheritedAncestorDerAttrs(); + + /** + * Get all inherited virtual attributes from the ancestors. + * + * @return a list of inherited and only inherited attributes. + */ + List<? extends GVirAttr> findLastInheritedAncestorVirAttrs(); + + /** + * Get first valid account policy. + * + * @return parent account policy if isInheritAccountPolicy is 'true' and parent is not null, local account policy + * otherwise. + */ + AccountPolicy getAccountPolicy(); + + <T extends AttrTemplate<K>, K extends Schema> List<T> findInheritedTemplates(Class<T> reference); + + <T extends AttrTemplate<K>, K extends Schema> T getAttrTemplate( + Class<T> reference, String schemaName); + + <T extends AttrTemplate<K>, K extends Schema> List<K> getAttrTemplateSchemas(Class<T> reference); + + <T extends AttrTemplate<K>, K extends Schema> List<T> getAttrTemplates(Class<T> reference); + + Set<? extends Entitlement> getEntitlements(); + + /** + * Get first valid password policy. + * + * @return parent password policy if isInheritPasswordPolicy is 'true' and parent is not null, local password policy + * otherwise + */ + PasswordPolicy getPasswordPolicy(); + + Group getGroupOwner(); + + User getUserOwner(); + + boolean isInheritAccountPolicy(); + + boolean isInheritPlainAttrs(); + + boolean isInheritDerAttrs(); + + boolean isInheritOwner(); + + boolean isInheritPasswordPolicy(); + + boolean isInheritTemplates(); + + boolean isInheritVirAttrs(); + + void setAccountPolicy(AccountPolicy accountPolicy); + + void setInheritAccountPolicy(boolean condition); + + void setInheritPlainAttrs(boolean inheritAttrs); + + void setInheritDerAttrs(boolean inheritDerAttrs); + + void setInheritOwner(boolean inheritOwner); + + void setInheritPasswordPolicy(boolean condition); + + void setInheritTemplates(boolean condition); + + void setInheritVirAttrs(boolean inheritVirAttrs); + + void setName(String name); + + void setParent(Group parent); + + void setPasswordPolicy(PasswordPolicy passwordPolicy); + + void setGroupOwner(Group groupOwner); + + void setUserOwner(User userOwner); + + @Override + boolean addPlainAttr(GPlainAttr attr); + + @Override + boolean addDerAttr(GDerAttr attr); + + @Override + boolean addVirAttr(GVirAttr attr); + + @Override + GPlainAttr getPlainAttr(String plainSchemaName); + + @Override + List<? extends GPlainAttr> getPlainAttrs(); + + @Override + GDerAttr getDerAttr(String derSchemaName); + + @Override + List<? extends GDerAttr> getDerAttrs(); + + @Override + GVirAttr getVirAttr(String virSchemaName); + + @Override + List<? extends GVirAttr> getVirAttrs(); + + @Override + boolean removePlainAttr(GPlainAttr attr); + + @Override + boolean removeDerAttr(GDerAttr derAttr); + + @Override + boolean removeVirAttr(GVirAttr virAttr); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java index 2288bcd..b83270a 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/membership/Membership.java @@ -20,16 +20,16 @@ package org.apache.syncope.core.persistence.api.entity.membership; import java.util.List; import org.apache.syncope.core.persistence.api.entity.Attributable; -import org.apache.syncope.core.persistence.api.entity.role.Role; +import org.apache.syncope.core.persistence.api.entity.group.Group; import org.apache.syncope.core.persistence.api.entity.user.User; public interface Membership extends Attributable<MPlainAttr, MDerAttr, MVirAttr> { - Role getRole(); + Group getGroup(); User getUser(); - void setRole(Role role); + void setGroup(Group group); void setUser(User user); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.java deleted file mode 100644 index af2eb0b..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttr.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.DerAttr; - -public interface RDerAttr extends DerAttr { - - @Override - Role getOwner(); - - @Override - RDerSchema getSchema(); - - RDerAttrTemplate getTemplate(); - - void setTemplate(RDerAttrTemplate template); -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.java deleted file mode 100644 index 605736e..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerAttrTemplate.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.AttrTemplate; - -public interface RDerAttrTemplate extends AttrTemplate<RDerSchema> { - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.java deleted file mode 100644 index 149b187..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RDerSchema.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.DerSchema; - -public interface RDerSchema extends DerSchema { - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.java deleted file mode 100644 index 4df8e28..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMapping.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.Mapping; - -public interface RMapping extends Mapping<RMappingItem> { - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java deleted file mode 100644 index 77b5ceb..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RMappingItem.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.Mapping; -import org.apache.syncope.core.persistence.api.entity.MappingItem; - -public interface RMappingItem extends MappingItem { - - @Override - Mapping<RMappingItem> getMapping(); - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java deleted file mode 100644 index c50ce33..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttr.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.role; - -import java.util.List; -import org.apache.syncope.core.persistence.api.entity.PlainAttr; - -public interface RPlainAttr extends PlainAttr { - - @Override - Role getOwner(); - - @Override - RPlainSchema getSchema(); - - RPlainAttrTemplate getTemplate(); - - void setTemplate(RPlainAttrTemplate template); - - @Override - List<? extends RPlainAttrValue> getValues(); - - @Override - RPlainAttrUniqueValue getUniqueValue(); - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.java deleted file mode 100644 index 2f8ec74..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrTemplate.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.AttrTemplate; - -public interface RPlainAttrTemplate extends AttrTemplate<RPlainSchema> { - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java deleted file mode 100644 index 6de3a89..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrUniqueValue.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.PlainAttrUniqueValue; - -public interface RPlainAttrUniqueValue extends PlainAttrUniqueValue { - - @Override - RPlainAttr getAttr(); - - @Override - RPlainSchema getSchema(); - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.java deleted file mode 100644 index 3314397..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainAttrValue.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.PlainAttrValue; - -public interface RPlainAttrValue extends PlainAttrValue { - - @Override - RPlainAttr getAttr(); - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.java deleted file mode 100644 index fdfefac..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RPlainSchema.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.PlainSchema; - -public interface RPlainSchema extends PlainSchema { - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.java deleted file mode 100644 index 8c3f9ca..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttr.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.VirAttr; - -public interface RVirAttr extends VirAttr { - - @Override - Role getOwner(); - - @Override - RVirSchema getSchema(); - - RVirAttrTemplate getTemplate(); - - void setTemplate(RVirAttrTemplate template); -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.java deleted file mode 100644 index 3df1189..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirAttrTemplate.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.AttrTemplate; - -public interface RVirAttrTemplate extends AttrTemplate<RVirSchema> { - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.java deleted file mode 100644 index 39476fb..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/RVirSchema.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.role; - -import org.apache.syncope.core.persistence.api.entity.VirSchema; - -public interface RVirSchema extends VirSchema { - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java deleted file mode 100644 index e3e4b23..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/role/Role.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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.role; - -import java.util.List; -import java.util.Set; -import org.apache.syncope.core.persistence.api.entity.AccountPolicy; -import org.apache.syncope.core.persistence.api.entity.AttrTemplate; -import org.apache.syncope.core.persistence.api.entity.Entitlement; -import org.apache.syncope.core.persistence.api.entity.PasswordPolicy; -import org.apache.syncope.core.persistence.api.entity.Schema; -import org.apache.syncope.core.persistence.api.entity.Subject; -import org.apache.syncope.core.persistence.api.entity.user.User; - -public interface Role extends Subject<RPlainAttr, RDerAttr, RVirAttr> { - - String getName(); - - Role getParent(); - - boolean addEntitlement(Entitlement entitlement); - - boolean removeEntitlement(Entitlement entitlement); - - /** - * Get all inherited attributes from the ancestors. - * - * @return a list of inherited and only inherited attributes. - */ - List<? extends RPlainAttr> findLastInheritedAncestorPlainAttrs(); - - /** - * Get all inherited derived attributes from the ancestors. - * - * @return a list of inherited and only inherited attributes. - */ - List<? extends RDerAttr> findLastInheritedAncestorDerAttrs(); - - /** - * Get all inherited virtual attributes from the ancestors. - * - * @return a list of inherited and only inherited attributes. - */ - List<? extends RVirAttr> findLastInheritedAncestorVirAttrs(); - - /** - * Get first valid account policy. - * - * @return parent account policy if isInheritAccountPolicy is 'true' and parent is not null, local account policy - * otherwise. - */ - AccountPolicy getAccountPolicy(); - - <T extends AttrTemplate<K>, K extends Schema> List<T> findInheritedTemplates(Class<T> reference); - - <T extends AttrTemplate<K>, K extends Schema> T getAttrTemplate( - Class<T> reference, String schemaName); - - <T extends AttrTemplate<K>, K extends Schema> List<K> getAttrTemplateSchemas(Class<T> reference); - - <T extends AttrTemplate<K>, K extends Schema> List<T> getAttrTemplates(Class<T> reference); - - Set<? extends Entitlement> getEntitlements(); - - /** - * Get first valid password policy. - * - * @return parent password policy if isInheritPasswordPolicy is 'true' and parent is not null, local password policy - * otherwise - */ - PasswordPolicy getPasswordPolicy(); - - Role getRoleOwner(); - - User getUserOwner(); - - boolean isInheritAccountPolicy(); - - boolean isInheritPlainAttrs(); - - boolean isInheritDerAttrs(); - - boolean isInheritOwner(); - - boolean isInheritPasswordPolicy(); - - boolean isInheritTemplates(); - - boolean isInheritVirAttrs(); - - void setAccountPolicy(AccountPolicy accountPolicy); - - void setInheritAccountPolicy(boolean condition); - - void setInheritPlainAttrs(boolean inheritAttrs); - - void setInheritDerAttrs(boolean inheritDerAttrs); - - void setInheritOwner(boolean inheritOwner); - - void setInheritPasswordPolicy(boolean condition); - - void setInheritTemplates(boolean condition); - - void setInheritVirAttrs(boolean inheritVirAttrs); - - void setName(String name); - - void setParent(Role parent); - - void setPasswordPolicy(PasswordPolicy passwordPolicy); - - void setRoleOwner(Role roleOwner); - - void setUserOwner(User userOwner); - - @Override - boolean addPlainAttr(RPlainAttr attr); - - @Override - boolean addDerAttr(RDerAttr attr); - - @Override - boolean addVirAttr(RVirAttr attr); - - @Override - RPlainAttr getPlainAttr(String plainSchemaName); - - @Override - List<? extends RPlainAttr> getPlainAttrs(); - - @Override - RDerAttr getDerAttr(String derSchemaName); - - @Override - List<? extends RDerAttr> getDerAttrs(); - - @Override - RVirAttr getVirAttr(String virSchemaName); - - @Override - List<? extends RVirAttr> getVirAttrs(); - - @Override - boolean removePlainAttr(RPlainAttr attr); - - @Override - boolean removeDerAttr(RDerAttr derAttr); - - @Override - boolean removeVirAttr(RVirAttr virAttr); -} http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java index 7631a6b..deaf36f 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PushTask.java @@ -20,11 +20,11 @@ package org.apache.syncope.core.persistence.api.entity.task; public interface PushTask extends ProvisioningTask { - String getRoleFilter(); + String getGroupFilter(); String getUserFilter(); - void setRoleFilter(String roleFilter); + void setGroupFilter(String filter); void setUserFilter(String filter); } http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java index f73dcfb..0d3b24c 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java @@ -18,12 +18,12 @@ */ package org.apache.syncope.core.persistence.api.entity.task; -import org.apache.syncope.common.lib.to.RoleTO; +import org.apache.syncope.common.lib.to.GroupTO; import org.apache.syncope.common.lib.to.UserTO; public interface SyncTask extends ProvisioningTask { - RoleTO getRoleTemplate(); + GroupTO getGroupTemplate(); UserTO getUserTemplate(); @@ -31,7 +31,7 @@ public interface SyncTask extends ProvisioningTask { void setFullReconciliation(boolean condition); - void setRoleTemplate(RoleTO roleTemplate); + void setGroupTemplate(GroupTO groupTemplate); void setUserTemplate(UserTO userTemplate); } http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/user/User.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/user/User.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/user/User.java index 66898e4..5c3ec4d 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/user/User.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/user/User.java @@ -25,7 +25,7 @@ import org.apache.syncope.common.lib.types.CipherAlgorithm; import org.apache.syncope.core.persistence.api.entity.ExternalResource; import org.apache.syncope.core.persistence.api.entity.Subject; import org.apache.syncope.core.persistence.api.entity.membership.Membership; -import org.apache.syncope.core.persistence.api.entity.role.Role; +import org.apache.syncope.core.persistence.api.entity.group.Group; public interface User extends Subject<UPlainAttr, UDerAttr, UVirAttr> { @@ -47,7 +47,7 @@ public interface User extends Subject<UPlainAttr, UDerAttr, UVirAttr> { Date getLastLoginDate(); - Membership getMembership(Long roleKey); + Membership getMembership(Long groupKey); List<? extends Membership> getMemberships(); @@ -57,9 +57,9 @@ public interface User extends Subject<UPlainAttr, UDerAttr, UVirAttr> { List<String> getPasswordHistory(); - Set<Long> getRoleKeys(); + Set<Long> getGroupKeys(); - List<Role> getRoles(); + List<Group> getGroups(); String getSecurityAnswer(); http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java index 61535d6..4a3f975 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java @@ -93,7 +93,7 @@ public class XMLContentExporter extends AbstractContentDealer implements Content Collections.singletonMap("TASK", "DTYPE <> 'PropagationTask'"); protected static final Map<String, Set<String>> COLUMNS_TO_BE_NULLIFIED = - Collections.singletonMap("SYNCOPEROLE", Collections.singleton("USEROWNER_ID")); + Collections.singletonMap("SYNCOPEGROUP", Collections.singleton("USEROWNER_ID")); private boolean isTableAllowed(final String tableName) { boolean allowed = true; http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractSubjectDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractSubjectDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractSubjectDAO.java index 1096b50..93c54e9 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractSubjectDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/AbstractSubjectDAO.java @@ -82,7 +82,7 @@ abstract class AbstractSubjectDAO<P extends PlainAttr, D extends DerAttr, V exte * * @param expression derived schema expression * @param value derived attribute value - * @param attrUtil USER / ROLE + * @param attrUtil USER / GROUP * @return where clauses to use to build the query */ private Set<String> getWhereClause(final String expression, final String value, final AttributableUtil attrUtil) { @@ -276,7 +276,7 @@ abstract class AbstractSubjectDAO<P extends PlainAttr, D extends DerAttr, V exte } /** - * Find users / roles by derived attribute value. This method could fail if one or more string literals contained + * Find users / groups by derived attribute value. This method could fail if one or more string literals contained * into the derived attribute value provided derive from identifier (schema name) replacement. When you are going to * specify a derived attribute expression you must be quite sure that string literals used to build the expression * cannot be found into the attribute values used to replace attribute schema names used as identifiers. @@ -284,7 +284,7 @@ abstract class AbstractSubjectDAO<P extends PlainAttr, D extends DerAttr, V exte * @param schemaName derived schema name * @param value derived attribute value * @param attrUtil AttributableUtil - * @return list of users / roles + * @return list of users / groups */ @Override public List<? extends Subject<P, D, V>> findByDerAttrValue( http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAttrTemplateDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAttrTemplateDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAttrTemplateDAO.java index 233257b..2b33178 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAttrTemplateDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAttrTemplateDAO.java @@ -27,16 +27,16 @@ import org.apache.syncope.core.persistence.api.entity.Schema; import org.apache.syncope.core.persistence.api.entity.membership.MDerAttrTemplate; import org.apache.syncope.core.persistence.api.entity.membership.MPlainAttrTemplate; import org.apache.syncope.core.persistence.api.entity.membership.MVirAttrTemplate; -import org.apache.syncope.core.persistence.api.entity.role.RDerAttrTemplate; -import org.apache.syncope.core.persistence.api.entity.role.RPlainAttrTemplate; -import org.apache.syncope.core.persistence.api.entity.role.RVirAttrTemplate; +import org.apache.syncope.core.persistence.api.entity.group.GDerAttrTemplate; +import org.apache.syncope.core.persistence.api.entity.group.GPlainAttrTemplate; +import org.apache.syncope.core.persistence.api.entity.group.GVirAttrTemplate; import org.apache.syncope.core.persistence.jpa.entity.AbstractAttrTemplate; import org.apache.syncope.core.persistence.jpa.entity.membership.JPAMDerAttrTemplate; import org.apache.syncope.core.persistence.jpa.entity.membership.JPAMPlainAttrTemplate; import org.apache.syncope.core.persistence.jpa.entity.membership.JPAMVirAttrTemplate; -import org.apache.syncope.core.persistence.jpa.entity.role.JPARDerAttrTemplate; -import org.apache.syncope.core.persistence.jpa.entity.role.JPARPlainAttrTemplate; -import org.apache.syncope.core.persistence.jpa.entity.role.JPARVirAttrTemplate; +import org.apache.syncope.core.persistence.jpa.entity.group.JPAGDerAttrTemplate; +import org.apache.syncope.core.persistence.jpa.entity.group.JPAGPlainAttrTemplate; +import org.apache.syncope.core.persistence.jpa.entity.group.JPAGVirAttrTemplate; import org.springframework.stereotype.Repository; import org.springframework.util.ReflectionUtils; @@ -53,12 +53,12 @@ public class JPAAttrTemplateDAO<S extends Schema> ? JPAMDerAttrTemplate.class : MVirAttrTemplate.class.isAssignableFrom(reference) ? JPAMVirAttrTemplate.class - : RPlainAttrTemplate.class.isAssignableFrom(reference) - ? JPARPlainAttrTemplate.class - : RDerAttrTemplate.class.isAssignableFrom(reference) - ? JPARDerAttrTemplate.class - : RVirAttrTemplate.class.isAssignableFrom(reference) - ? JPARVirAttrTemplate.class + : GPlainAttrTemplate.class.isAssignableFrom(reference) + ? JPAGPlainAttrTemplate.class + : GDerAttrTemplate.class.isAssignableFrom(reference) + ? JPAGDerAttrTemplate.class + : GVirAttrTemplate.class.isAssignableFrom(reference) + ? JPAGVirAttrTemplate.class : null; } http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerAttrDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerAttrDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerAttrDAO.java index daf0cb1..ff32fb8 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerAttrDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerAttrDAO.java @@ -24,11 +24,11 @@ import org.apache.syncope.core.persistence.api.dao.DerAttrDAO; import org.apache.syncope.core.persistence.api.entity.Attributable; import org.apache.syncope.core.persistence.api.entity.DerAttr; import org.apache.syncope.core.persistence.api.entity.membership.MDerAttr; -import org.apache.syncope.core.persistence.api.entity.role.RDerAttr; +import org.apache.syncope.core.persistence.api.entity.group.GDerAttr; import org.apache.syncope.core.persistence.api.entity.user.UDerAttr; import org.apache.syncope.core.persistence.jpa.entity.AbstractDerAttr; import org.apache.syncope.core.persistence.jpa.entity.membership.JPAMDerAttr; -import org.apache.syncope.core.persistence.jpa.entity.role.JPARDerAttr; +import org.apache.syncope.core.persistence.jpa.entity.group.JPAGDerAttr; import org.apache.syncope.core.persistence.jpa.entity.user.JPAUDerAttr; import org.springframework.stereotype.Repository; @@ -38,8 +38,8 @@ public class JPADerAttrDAO extends AbstractDAO<DerAttr, Long> implements DerAttr public <T extends DerAttr> Class<? extends AbstractDerAttr> getJPAEntityReference( final Class<T> reference) { - return RDerAttr.class.isAssignableFrom(reference) - ? JPARDerAttr.class + return GDerAttr.class.isAssignableFrom(reference) + ? JPAGDerAttr.class : MDerAttr.class.isAssignableFrom(reference) ? JPAMDerAttr.class : UDerAttr.class.isAssignableFrom(reference) http://git-wip-us.apache.org/repos/asf/syncope/blob/4095f1e8/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerSchemaDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerSchemaDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerSchemaDAO.java index 985851e..6e1db3f 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerSchemaDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPADerSchemaDAO.java @@ -32,13 +32,13 @@ import org.apache.syncope.core.persistence.api.entity.AttributableUtil; import org.apache.syncope.core.persistence.api.entity.DerAttr; import org.apache.syncope.core.persistence.api.entity.DerSchema; import org.apache.syncope.core.persistence.api.entity.membership.MDerSchema; -import org.apache.syncope.core.persistence.api.entity.role.RDerSchema; +import org.apache.syncope.core.persistence.api.entity.group.GDerSchema; import org.apache.syncope.core.persistence.api.entity.user.UDerAttr; import org.apache.syncope.core.persistence.api.entity.user.UDerSchema; import org.apache.syncope.core.persistence.api.entity.user.UMappingItem; import org.apache.syncope.core.persistence.jpa.entity.AbstractDerSchema; import org.apache.syncope.core.persistence.jpa.entity.membership.JPAMDerSchema; -import org.apache.syncope.core.persistence.jpa.entity.role.JPARDerSchema; +import org.apache.syncope.core.persistence.jpa.entity.group.JPAGDerSchema; import org.apache.syncope.core.persistence.jpa.entity.user.JPAUDerSchema; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @@ -56,8 +56,8 @@ public class JPADerSchemaDAO extends AbstractDAO<DerSchema, String> implements D private ExternalResourceDAO resourceDAO; private <T extends DerSchema> Class<? extends AbstractDerSchema> getJPAEntityReference(final Class<T> reference) { - return RDerSchema.class.isAssignableFrom(reference) - ? JPARDerSchema.class + return GDerSchema.class.isAssignableFrom(reference) + ? JPAGDerSchema.class : MDerSchema.class.isAssignableFrom(reference) ? JPAMDerSchema.class : UDerSchema.class.isAssignableFrom(reference)
