Author: bdaw
Date: 2008-06-04 15:10:31 -0400 (Wed, 04 Jun 2008)
New Revision: 10924
Removed:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/RelationType.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityService.java
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/Group.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/IdentityModule.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/User.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityRepository.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityStore.java
Log:
some refactorings
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/Group.java
===================================================================
---
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/Group.java 2008-06-04
18:59:16 UTC (rev 10923)
+++
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/Group.java 2008-06-04
19:10:31 UTC (rev 10924)
@@ -38,22 +38,22 @@
/**
* @return group id
*/
- public Object getId();
+ Object getId();
/**
* @return group name
*/
- public String getName();
+ String getName();
/**
* @return group type
*/
- public GroupType getType();
+ GroupType getType();
/**
* @return map containing group attributes
*/
- public Map<String, String[]> getAttributes();
+ Map<String, String[]> getAttributes();
/**
* Update user attribute values
@@ -61,36 +61,36 @@
* @param values
* @return
*/
- public boolean updateAttribute(String attrName, String[] values);
+ boolean updateAttribute(String attrName, String[] values);
/**
* @return id of parent group for the relations of RelationType.HIERARCHICAL. If the
parent id is null, this object
* is a child of a root group in the store
*/
- public Object getParentId();
+ Object getParentId();
/**
* @return set of users assigned to this group
*/
- public Set<User> getUsers();
+ Set<User> getUsers();
/**
* @return set of groups that are either children of this group or implied for this
group
*/
- public Set<Group> getGroups();
+ Set<Group> getGroups();
/**
* @param type of the relation
* @return set of groups that have given relation type with this group and the
direction of the relation is towords
* this group
*/
- public Set<Group> getGroups(RelationshipType type);
+ Set<Group> getGroups(RelationshipType type);
/**
* @param group
* @return returns a relationship type between this and given group.
*/
- public RelationshipType getRelationship(Group group);
+ RelationshipType getRelationship(Group group);
/**
* Assign a set of groups to this group. All other group associations (with this
relation type) for this group
@@ -99,13 +99,13 @@
* @param type
* @return
*/
- public boolean assignGroups(Set<Group> toGroups, RelationshipType type);
+ boolean assignGroups(Set<Group> toGroups, RelationshipType type);
/**
* Assign a set of users to this group. All other user associations will be
overwritten for this group
* @param users
* @return
*/
- public boolean assignUsers(Set<User> users);
+ boolean assignUsers(Set<User> users);
}
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/IdentityModule.java
===================================================================
---
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/IdentityModule.java 2008-06-04
18:59:16 UTC (rev 10923)
+++
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/IdentityModule.java 2008-06-04
19:10:31 UTC (rev 10924)
@@ -42,35 +42,35 @@
* @param userName
* @return
*/
- public User createUser(String userName);
+ User createUser(String userName);
/**
* Remove user from the the data store
* @param user
* @return
*/
- public boolean removeUser(User user);
+ boolean removeUser(User user);
/**
* Find user with a given user name
* @param userName
* @return
*/
- public User findUser(String userName);
+ User findUser(String userName);
/**
* Find user with a given id
* @param id
* @return
*/
- public User findUser(Object id);
+ User findUser(Object id);
/**
* Find users with a given properties values
* @param properties
* @return
*/
- public Set<Group> findUsers(Map<String, String[]> properties);
+ Set<Group> findUsers(Map<String, String[]> properties);
// Groups
@@ -80,45 +80,40 @@
* @param groupName
* @return
*/
- public Group createGroup(String groupName, GroupType type);
+ Group createGroup(String groupName, GroupType type);
/**
* Remove group from the data store
* @param group
* @return
*/
- public boolean removeGroup(Group group);
+ boolean removeGroup(Group group);
/**
* Find group with a given name
* @param name
* @return
*/
- public Group findGroup(String name);
+ Group findGroup(String name);
/**
* Find Group with a given object id
* @param id
* @return
*/
- public Group findGroup(Object id);
+ Group findGroup(Object id);
/**
* Find Group with a given group type
* @param groupType
* @return
*/
- public Group findGroup(GroupType groupType);
+ Group findGroup(GroupType groupType);
/**
* Find groups with a given attributes values
* @param properties
* @return
*/
- public Set<Group> findGroups(Map<String, String[]> properties);
-
-
-
-
-
+ Set<Group> findGroups(Map<String, String[]> properties);
}
Deleted:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/RelationType.java
===================================================================
---
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/RelationType.java 2008-06-04
18:59:16 UTC (rev 10923)
+++
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/RelationType.java 2008-06-04
19:10:31 UTC (rev 10924)
@@ -1,35 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-
-package org.jboss.portal.identity2.api;
-
-/**
- * Relation between two groups
- */
-public enum RelationType
-{
- // Tree like hierarchy (parent -> children)
- HIERARCHICAL,
-
- // Implied
- IMPLIED
-}
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/User.java
===================================================================
---
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/User.java 2008-06-04
18:59:16 UTC (rev 10923)
+++
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/api/User.java 2008-06-04
19:10:31 UTC (rev 10924)
@@ -36,17 +36,17 @@
/**
* @return user id
*/
- public Object getId();
+ Object getId();
/**
* @return user name
*/
- public String getUserName();
+ String getUserName();
/**
* @return map containing user attributes
*/
- public Map<String, String[]> getAttributes();
+ Map<String, String[]> getAttributes();
/**
* Update user attribute values
@@ -54,24 +54,24 @@
* @param values
* @return
*/
- public boolean updateAttribute(String attrName, String[] values);
+ boolean updateAttribute(String attrName, String[] values);
/**
* @return a set of groups that this user belongs to
*/
- public Set<Group> getGroups();
+ Set<Group> getGroups();
/**
* @param groupType
* @return a set of groups with a given groupType that this user belongs to
*/
- public Set<Group> getGroups(GroupType groupType);
+ Set<Group> getGroups(GroupType groupType);
/**
* Assign a set of groups to this user. All other group associations will be
overwritten
* @param groups
* @return
*/
- public boolean assignGroups(Set<Group> groups);
+ boolean assignGroups(Set<Group> groups);
}
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityRepository.java
===================================================================
---
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityRepository.java 2008-06-04
18:59:16 UTC (rev 10923)
+++
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityRepository.java 2008-06-04
19:10:31 UTC (rev 10924)
@@ -25,7 +25,7 @@
import java.util.Set;
/**
- * IdentityRepositoryexposes identity object management operations and act as an entry
point to the underlaying data stores.
+ * IdentityRepository exposes identity object management operations and act as an entry
point to the underlaying data stores.
* Its responsibility is to map identity objects, their state and relations between them
across different identity stores.
*
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
Deleted:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityService.java
===================================================================
---
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityService.java 2008-06-04
18:59:16 UTC (rev 10923)
+++
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityService.java 2008-06-04
19:10:31 UTC (rev 10924)
@@ -1,37 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-
-package org.jboss.portal.identity2.spi;
-
-import java.util.Set;
-
-/**
- * IdentityService exposes identity object management operations and act as an entry
point to the underlaying data stores.
- * Its responsibility is to map identity objects, their state and relations between them
across different identity stores.
- *
- * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
- * @version : 0.1 $
- */
-public interface IdentityService
-{
- public Set<IdentityStore> getConfiguredIdentityStores();
-}
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityStore.java
===================================================================
---
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityStore.java 2008-06-04
18:59:16 UTC (rev 10923)
+++
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity2/spi/IdentityStore.java 2008-06-04
19:10:31 UTC (rev 10924)
@@ -24,8 +24,7 @@
import org.jboss.portal.identity2.api.GroupType;
-import java.util.Map;
-import java.util.List;
+
import java.util.Set;
/**