Author: bdaw
Date: 2009-06-09 11:15:52 -0400 (Tue, 09 Jun 2009)
New Revision: 597
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/AttributeDescription.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Group.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySearchCriteria.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySession.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySessionFactory.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentityType.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManager.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManagerFeaturesDescription.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RealmManager.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManager.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManagerFeaturesDescription.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Role.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RoleManager.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfiguration.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfigurationRegistry.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQuery.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQueryBuilder.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/Query.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QueryBuilder.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QuerySortOrder.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQuery.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQueryBuilder.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQuery.java
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQueryBuilder.java
Log:
some of javadoc updates
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/AttributeDescription.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/AttributeDescription.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/AttributeDescription.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -24,33 +24,34 @@
/**
* Information about attribute
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
public interface AttributeDescription
{
/**
- * @return
+ * @return attribute name
*/
String getName();
/**
- * @return
+ * @return attribute type.
*/
String getType();
/**
- * @return
+ * @return if attribute is readonly
*/
boolean isReadonly();
/**
- * @return
+ * @return if attribute can have many values
*/
boolean isMultivalued();
/**
- * @return
+ * @return if attribute is required
*/
boolean isRequired();
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Group.java
===================================================================
--- idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Group.java 2009-06-05
16:22:07 UTC (rev 596)
+++ idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Group.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -27,7 +27,7 @@
/**
* Represents a Group. Group has a name that is unique in scope of a given group type.
This means that groupType/name pairs
* uniquely identifies group. Group Id contains encoded group type and name imformation.
In default implementation
- * it can look as follows: "group:/GROUP_TYPE/GROUP_NAME". Still prefix and
format of Id can change in the future so
+ * it can look as follows: "jbpid_group_id_._._GROUP_TYPE_._._GROUP_NAME".
Still prefix and format of Id can change in the future so
* PersistenceManager.createGroupId(String groupName, String groupType) method should be
used to create it.
*
* @author Anil.Saldhana(a)redhat.com
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySearchCriteria.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySearchCriteria.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySearchCriteria.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -24,20 +24,58 @@
/**
+ * Criteria applied to identity objects searches
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
public interface IdentitySearchCriteria
{
+ /**
+ * Sort results
+ * @param order
+ * @return
+ * @throws UnsupportedCriterium
+ */
IdentitySearchCriteria sort(SortOrder order) throws UnsupportedCriterium;
+ /**
+ * Sort results by attribute name
+ *
+ * @param name
+ * @return
+ * @throws UnsupportedCriterium
+ */
IdentitySearchCriteria sortAttributeName(String name) throws UnsupportedCriterium;
+ /**
+ * Return only specified page from results
+ *
+ * @param firstResult
+ * @param maxResults
+ * @return
+ * @throws UnsupportedCriterium
+ */
IdentitySearchCriteria page(int firstResult, int maxResults) throws
UnsupportedCriterium;
+ /**
+ * Filter results by attribute values. All values must be present
+ *
+ * @param attributeName
+ * @param attributeValue
+ * @return
+ * @throws UnsupportedCriterium
+ */
IdentitySearchCriteria attributeValuesFilter(String attributeName, String[]
attributeValue) throws UnsupportedCriterium;
+ /**
+ * Filter results by id. Wildcard '*' can be used
+ *
+ * @param filter
+ * @return
+ * @throws UnsupportedCriterium
+ */
IdentitySearchCriteria idFilter(String filter) throws UnsupportedCriterium;
}
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySession.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySession.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySession.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -115,24 +115,28 @@
RoleManager getRoleManager() throws FeatureNotSupportedException ;
/**
- *
+ * Create UserQueryBuilder object
+ *
* @return
*/
UserQueryBuilder createUserQueryBuilder();
/**
+ * Create GroupQueryBuilder object
*
* @return
*/
GroupQueryBuilder createGroupQueryBuilder();
/**
+ * Create RoleQueryBuilder object
*
* @return
*/
RoleQueryBuilder createRoleQueryBuilder() throws FeatureNotSupportedException;
/**
+ * Execute UserQuery
*
* @param userQuery
* @return
@@ -141,6 +145,7 @@
Collection<User> execute(UserQuery userQuery) throws QueryException;
/**
+ * Execute UserQuery and get unique result
*
* @param userQuery
* @return
@@ -149,6 +154,7 @@
User uniqueResult(UserQuery userQuery) throws QueryException;
/**
+ * Execute UserQuery and get results as List
*
* @param userQuery
* @return
@@ -157,6 +163,7 @@
List<User> list(UserQuery userQuery) throws QueryException;
/**
+ * Execute GroupQuery
*
* @param groupQuery
* @return
@@ -165,6 +172,7 @@
Collection<Group> execute(GroupQuery groupQuery) throws QueryException;
/**
+ * Execute GroupQuery and get unique result
*
* @param groupQuery
* @return
@@ -173,6 +181,7 @@
Group uniqueResult(GroupQuery groupQuery) throws QueryException;
/**
+ * Execute GroupQuery and get results as List
*
* @param groupQuery
* @return
@@ -181,6 +190,7 @@
List<Group> list(GroupQuery groupQuery) throws QueryException;
/**
+ * Execute RoleQuery
*
* @param roleQuery
* @return
@@ -189,6 +199,7 @@
Collection<Role> execute(RoleQuery roleQuery) throws QueryException;
/**
+ * Execute RoleQuery and get unique result
*
* @param roleQuery
* @return
@@ -197,6 +208,7 @@
Role uniqueResult(RoleQuery roleQuery) throws QueryException;
/**
+ * Execute RoleQuery and get results as List
*
* @param roleQuery
* @return
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySessionFactory.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySessionFactory.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentitySessionFactory.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -33,12 +33,12 @@
public interface IdentitySessionFactory
{
/**
- *
+ * Close IdentitySessionFactory
*/
void close();
/**
- * @return
+ * @return if closed
*/
boolean isClosed();
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentityType.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentityType.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/IdentityType.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -24,8 +24,7 @@
/**
- * Interface representing
- * an object of the Identity Model
+ * Parent interface for User and Group. Represents identity object
*
* @author Anil.Saldhana(a)redhat.com
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManager.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManager.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManager.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -46,6 +46,10 @@
*/
PersistenceManagerFeaturesDescription getFeaturesDescription();
+ /**
+ * Create IdentitySearchCriteria
+ * @return
+ */
IdentitySearchCriteria createIdentitySearchCriteria();
@@ -71,7 +75,7 @@
/**
* <p>Create a group Id. Result string can be used in other methods. Group Id
contains encoded group type and
* name imformation.
- * In default implementation it can look as follows:
"group:/GROUP_TYPE/GROUP_NAME".
+ * In default implementation it can look as follows:
"jbpid_group_id_._._GROUP_TYPE_._._GROUP_NAME".
* Still prefix and format of Id can change in the future so this method should be
used to create it.</p>
* @param groupName
* @param groupType
@@ -82,7 +86,7 @@
// Remove
/**
- * Remove given identity
+ * Remove given user
*
* @param user
* @param force - if true all present relationships will be removed, if false any
present relationship will cause
@@ -92,7 +96,7 @@
void removeUser(User user, boolean force) throws IdentityException;
/**
- * Remove given identity
+ * Remove given user
*
* @param id
* @param force - if true all present relationships will be removed, if false any
present relationship will cause
@@ -124,7 +128,7 @@
// Search
/**
- * @return a number of stored identities
+ * @return a number of stored users
* @throws org.jboss.identity.idm.common.exception.IdentityException
*/
int getUserCount()
@@ -139,7 +143,7 @@
throws IdentityException;
/**
- * Find identity with a given name
+ * Find user with a given name
*
* @param name
* @return
@@ -148,6 +152,7 @@
User findUser(String name) throws IdentityException;
/**
+ * Obtain users
*
* @param criteria
* @return
@@ -178,6 +183,7 @@
/**
+ * Find groups
*
* @param groupType
* @param criteria
@@ -187,6 +193,7 @@
Collection<Group> findGroup(String groupType, IdentitySearchCriteria criteria)
throws IdentityException;
/**
+ * Find groups
*
* @param groupType
* @return
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManagerFeaturesDescription.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManagerFeaturesDescription.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/PersistenceManagerFeaturesDescription.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -32,7 +32,7 @@
{
/**
- * Check if Identity objects can be created and removed
+ * Check if User objects can be created and removed
* @return
*/
boolean isUsersAddRemoveSupported();
@@ -46,7 +46,7 @@
boolean isGroupsAddRemoveSupported(String groupType);
/**
- * Check if control can be used in Identity search methods
+ * Check if criterium can be used in Identity search methods
*
* @param criteriumType
* @return
@@ -54,7 +54,7 @@
boolean isUsersSearchCriteriumTypeSupported(IdentitySearchCriteriumType
criteriumType);
/**
- * Check if control can be used in Group search methods
+ * Check if criterium can be used in Group search methods
*
* @param groupType
* @param criteriumType
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RealmManager.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RealmManager.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RealmManager.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -1,87 +1,89 @@
-/*
-* 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.
-*/
+//TODO: Implement
-package org.jboss.identity.idm.api;
-
-import org.jboss.identity.idm.common.exception.IdentityException;
-
-import java.io.InputStream;
-
-/**
- * All operations connected with realms.
- * Because operations on realms are not often there is no transaction or session
support.
- *
- * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
- * @version : 0.1 $
- */
-public interface RealmManager
-{
-
-
- /**
- * <p>Create a Realm or return an already
- * created realm. Bootstrapping includes generating
- * the models in the realm</p>
- * @param realmName
- * @return
- */
- Realm bootstrap(String realmName) throws IdentityException;
-
- /**
- * <p>Bootstrap a realm given a configuration</p>
- * @param realmName
- * @param config
- * @return
- */
- Realm bootstrap(String realmName, InputStream config) throws IdentityException;
-
- /**
- * <p>Associate a relationship between two realms</p>
- * @param realmA
- * @param realmB
- */
- void associate(Realm realmA, Realm realmB) throws IdentityException;
-
-
- /**
- * <p>Disassociate a relationship between two realms</p>
- * @param realmA
- * @param realmB
- */
- void disassociate(Realm realmA, Realm realmB) throws IdentityException;
-
- /**
- * @param fromRealm
- * @param toRealm
- * @return returns a relationship type between this and given Realm.
- */
- boolean isAssosiated(Realm fromRealm, Realm toRealm) throws IdentityException;
-
- /**
- * <p>Return a realm</p>
- * @param realmName
- * @param shouldBootstrap Should we bootstrap if a realm does not exist?
- * @return
- */
- Realm getRealm(String realmName, boolean shouldBootstrap) throws IdentityException;
-
-}
+///*
+//* 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.identity.idm.api;
+//
+//import org.jboss.identity.idm.common.exception.IdentityException;
+//
+//import java.io.InputStream;
+//
+///**
+// * All operations connected with realms.
+// * Because operations on realms are not often there is no transaction or session
support.
+// *
+// * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+// * @version : 0.1 $
+// */
+//public interface RealmManager
+//{
+//
+//
+// /**
+// * <p>Create a Realm or return an already
+// * created realm. Bootstrapping includes generating
+// * the models in the realm</p>
+// * @param realmName
+// * @return
+// */
+// Realm bootstrap(String realmName) throws IdentityException;
+//
+// /**
+// * <p>Bootstrap a realm given a configuration</p>
+// * @param realmName
+// * @param config
+// * @return
+// */
+// Realm bootstrap(String realmName, InputStream config) throws IdentityException;
+//
+// /**
+// * <p>Associate a relationship between two realms</p>
+// * @param realmA
+// * @param realmB
+// */
+// void associate(Realm realmA, Realm realmB) throws IdentityException;
+//
+//
+// /**
+// * <p>Disassociate a relationship between two realms</p>
+// * @param realmA
+// * @param realmB
+// */
+// void disassociate(Realm realmA, Realm realmB) throws IdentityException;
+//
+// /**
+// * @param fromRealm
+// * @param toRealm
+// * @return returns a relationship type between this and given Realm.
+// */
+// boolean isAssosiated(Realm fromRealm, Realm toRealm) throws IdentityException;
+//
+// /**
+// * <p>Return a realm</p>
+// * @param realmName
+// * @param shouldBootstrap Should we bootstrap if a realm does not exist?
+// * @return
+// */
+// Realm getRealm(String realmName, boolean shouldBootstrap) throws IdentityException;
+//
+//}
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManager.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManager.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManager.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -198,7 +198,7 @@
throws IdentityException;
/**
- * <p>Disassociate identities from groups</p>
+ * <p>Disassociate users from groups</p>
* @param parents
* @param members
* @throws org.jboss.identity.idm.common.exception.IdentityException
@@ -207,7 +207,7 @@
throws IdentityException;
/**
- * <p>Disassociate identities from groups</p>
+ * <p>Disassociate users from group</p>
* @param parent
* @param members
* @throws org.jboss.identity.idm.common.exception.IdentityException
@@ -216,7 +216,7 @@
throws IdentityException;
/**
- * <p>Disassociate identities from groups</p>
+ * <p>Disassociate users from groups</p>
* @param parents
* @param members
* @throws org.jboss.identity.idm.common.exception.IdentityException
@@ -225,7 +225,7 @@
throws IdentityException;
/**
- * <p>Disassociate identities from groups</p>
+ * <p>Disassociate users from groups</p>
* @param parent
* @param members
* @throws org.jboss.identity.idm.common.exception.IdentityException
@@ -335,7 +335,7 @@
IdentitySearchCriteria criteria) throws
IdentityException;
/**
- * Find all groups that given identity is associated with.
+ * Find all groups that given users is associated with.
* @param user child identity
* @param groupType can be null
* @return
@@ -345,7 +345,7 @@
String groupType) throws IdentityException;
/**
- * Find all groups that given identity is associated with.
+ * Find all groups that given user is associated with.
*
* @param user child identity
* @param groupType can be null
@@ -357,7 +357,7 @@
IdentitySearchCriteria criteria) throws
IdentityException;
/**
- * Find all groups that given identity is associated with.
+ * Find all groups that given user is associated with.
*
* @param userId - id of associated user
* @param groupType can be null
@@ -369,7 +369,7 @@
IdentitySearchCriteria criteria) throws
IdentityException;
/**
- * Find all groups that given identity is associated with.
+ * Find all groups that given user is associated with.
*
* @param user child identity
* @return
@@ -379,7 +379,7 @@
IdentitySearchCriteria criteria) throws
IdentityException;
/**
- * Find all groups that given identity is associated with.
+ * Find all groups that given user is associated with.
*
* @param userId
* @return
@@ -389,7 +389,7 @@
IdentitySearchCriteria criteria) throws
IdentityException;
/**
- * Find all groups that given identity is associated with.
+ * Find all groups that given user is associated with.
*
* @param user child identity
* @return
@@ -398,7 +398,7 @@
Collection<Group> findAssociatedGroups(User user) throws IdentityException;
/**
- * Find identities that have relationship with given parent group.
+ * Find users that have relationship with given parent group.
*
* @param group parent group
* @param cascade if true also identities from subgroubs will be retrieved. Default is
false
@@ -409,7 +409,7 @@
boolean cascade) throws IdentityException;
/**
- * Find identities that have relationship with given parent group.
+ * Find users that have relationship with given parent group.
*
* @param group parent group
* @param cascade if true also identities from subgroubs will be retrieved. Default is
false
@@ -421,7 +421,7 @@
IdentitySearchCriteria criteria) throws
IdentityException;
/**
- * Find identities that have relationship with given parent group.
+ * Find users that have relationship with given parent group.
*
* @param groupId parent group id
* @param cascade if true also identities from subgroubs will be retrieved. Default is
false
@@ -458,7 +458,7 @@
IdentitySearchCriteria criteria) throws
IdentityException;
/**
- * Find identities that have relationship with given parent group. Will return users
connected with a given group with a role
+ * Find users that have relationship with given parent group. Will return users
connected with a given group with a role
*
* @param group parent group
* @return
@@ -467,7 +467,7 @@
Collection<User> findRelatedUsers(Group group, IdentitySearchCriteria criteria)
throws IdentityException;
/**
- * Find identities that have relationship with given parent group. Will return users
connected with a given group with a role
+ * Find users that have relationship with given parent group. Will return users
connected with a given group with a role
*
* @param groupId parent group id
* @return
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManagerFeaturesDescription.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManagerFeaturesDescription.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RelationshipManagerFeaturesDescription.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -47,7 +47,7 @@
boolean isGroupAssociationSupported(String fromGroupType, String toGroupType);
/**
- * Check if control can be used in Identity search methods
+ * Check if control can be used in User search methods
*
* @param criteriumType
* @return
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Role.java
===================================================================
--- idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Role.java 2009-06-05
16:22:07 UTC (rev 596)
+++ idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/Role.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -23,8 +23,8 @@
/**
- * Marker Interface represents a role. Role is a direct one-to-one typed relationship
between Identity and Group objects.
- * Each Identity and Group object pair can have several Role objects associated with them
with different RoleType specified.
+ * Marker Interface represents a role. Role is a direct one-to-one typed relationship
between User and Group objects.
+ * Each User and Group object pair can have several Role objects associated with them
with different RoleType specified.
*
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @since Jun 30, 2008
@@ -38,7 +38,7 @@
RoleType getRoleType();
/**
- * @return identity participating in this role
+ * @return user participating in this role
*/
User getUser();
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RoleManager.java
===================================================================
--- idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RoleManager.java 2009-06-05
16:22:07 UTC (rev 596)
+++ idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/RoleManager.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -216,7 +216,7 @@
Collection<RoleType> findRoleTypes(User user, Group group) throws
IdentityException;
/**
- * Find RoleType objects for roles associated with a given Identity
+ * Find RoleType objects for roles associated with a given User
* @param user
* @return
* @throws IdentityException
@@ -224,7 +224,7 @@
Collection<RoleType> findUserRoleTypes(User user) throws IdentityException;
/**
- * Find RoleType objects for roles associated with a given Identity
+ * Find RoleType objects for roles associated with a given User
* @param user
* @return
* @throws IdentityException
@@ -232,7 +232,7 @@
Collection<RoleType> findUserRoleTypes(User user, IdentitySearchCriteria
criteria) throws IdentityException;
/**
- * Find RoleType objects for roles associated with a given Identity
+ * Find RoleType objects for roles associated with a given User
* @param userId
* @return
* @throws IdentityException
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfiguration.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfiguration.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfiguration.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -28,18 +28,45 @@
import java.io.File;
/**
+ * IdentityConfiguration can be populated from config file or resource. Enables to
bootstrap IdentitySessionFactory
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
public interface IdentityConfiguration
{
+ /**
+ * Populate IdentityConfiguration from config file
+ *
+ * @param configFile
+ * @return
+ * @throws IdentityConfigurationException
+ */
IdentityConfiguration configure(File configFile) throws
IdentityConfigurationException;
+ /**
+ * Populate IdentityConfigration from config resource
+ *
+ * @param configResource
+ * @return
+ * @throws IdentityConfigurationException
+ */
IdentityConfiguration configure(String configResource) throws
IdentityConfigurationException;
+ /**
+ * Bootstrap IdentitySessionFactory
+ *
+ * @return
+ * @throws IdentityConfigurationException
+ */
IdentitySessionFactory buildIdentitySessionFactory() throws
IdentityConfigurationException;
+ /**
+ * Obtain IdentityConfigurationRegistry related to this IdentityConfiguration
+ *
+ * @return
+ */
IdentityConfigurationRegistry getIdentityConfigurationRegistry();
}
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfigurationRegistry.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfigurationRegistry.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/cfg/IdentityConfigurationRegistry.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -25,6 +25,8 @@
import org.jboss.identity.idm.common.exception.IdentityException;
/**
+ * Simple registry enables to register object instance and then reference it from
configuration file.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQuery.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQuery.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQuery.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -30,6 +30,8 @@
import java.util.List;
/**
+ * Query for Group objects
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQueryBuilder.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQueryBuilder.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/GroupQueryBuilder.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -29,57 +29,207 @@
import java.util.Collection;
/**
+ * Expose operations to set conditions for Group search and create GroupQuery
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
public interface GroupQueryBuilder extends QueryBuilder
{
+ /**
+ * Create GroupQuery based on conditions set using other GroupQueryBuilder methods.
+ * @return
+ */
GroupQuery createQuery();
+ /**
+ * Reset all query conditions
+ * @return
+ */
GroupQueryBuilder reset();
+ /**
+ * Search for a Group with a given ID
+ *
+ * @param id
+ * @return
+ */
GroupQueryBuilder setId(String id);
+ /**
+ * Search for groups with a given name and type
+ * @param name
+ * @param type
+ * @return
+ */
GroupQueryBuilder setNameAndType(String name, String type);
+ /**
+ * Search for groups with a given name
+ *
+ * @param name
+ * @return
+ */
GroupQueryBuilder setName(String name);
+ /**
+ * Search for groups with a given type
+ * @param type
+ * @return
+ */
GroupQueryBuilder setType(String type);
+ /**
+ * Search for groups that are associated with a given group
+ *
+ * @param group
+ * @param parent
+ * @return
+ */
GroupQueryBuilder addAssociatedGroup(Group group, boolean parent);
+ /**
+ * Search for groups that are associated with a given group
+ *
+ * @param id
+ * @param parent
+ * @return
+ */
GroupQueryBuilder addAssociatedGroup(String id, boolean parent);
+ /**
+ * Search for groups that are associated with a given groups
+ * @param groups
+ * @param parent
+ * @return
+ */
GroupQueryBuilder addAssociatedGroups(Collection<Group> groups, boolean
parent);
+ /**
+ * Search for groups that are associated with a given groups
+ *
+ * @param ids
+ * @param parent
+ * @return
+ */
GroupQueryBuilder addAssociatedGroupsIds(Collection<String> ids, boolean
parent);
+ /**
+ * Search for groups that are associated with a given user
+ *
+ * @param user
+ * @return
+ */
GroupQueryBuilder addAssociatedUser(User user);
+ /**
+ * Search for groups that are associated with a given user
+ *
+ * @param id
+ * @return
+ */
GroupQueryBuilder addAssociatedUser(String id);
+ /**
+ * Search for groups that are associated with a given users
+ *
+ * @param users
+ * @return
+ */
GroupQueryBuilder addAssociatedUsers(Collection<User> users);
+ /**
+ * Search for groups that are associated with a given users
+ *
+ * @param ids
+ * @return
+ */
GroupQueryBuilder addAssociatedUsersIds(Collection<String> ids);
+ /**
+ * Search for groups that are connected with a Role with a given user
+ *
+ * @param user
+ * @return
+ */
GroupQueryBuilder addUserConnectedByRole(User user);
+ /**
+ * Search for groups that are connected with a Role with a given user
+ *
+ * @param id
+ * @return
+ */
GroupQueryBuilder addUserConnectedByRole(String id);
+ /**
+ * Search for groups that are connected with a Role with a given users
+ *
+ * @param users
+ * @return
+ */
GroupQueryBuilder addUsersConnectedByRole(Collection<User> users);
+ /**
+ * Search for groups that are connected with a Role with a given users
+ *
+ * @param ids
+ * @return
+ */
GroupQueryBuilder addUsersIdsConnectedByRole(Collection<String> ids);
+ /**
+ * Search for groups that are associated or connected with a Role with a given user
+ *
+ * @param user
+ * @return
+ */
GroupQueryBuilder addRelatedUser(User user);
+ /**
+ * Search for groups that are associated or connected with a Role with a given user
+ *
+ * @param id
+ * @return
+ */
GroupQueryBuilder addRelatedUser(String id);
+ /**
+ * Sort results
+ *
+ * @param order
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
GroupQueryBuilder sort(SortOrder order) throws UnsupportedQueryCriterium;
+ /**
+ * Sort by attribute name
+ *
+ * @param name
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
GroupQueryBuilder sortAttributeName(String name) throws UnsupportedQueryCriterium;
+ /**
+ * Return specified page from results
+ *
+ * @param firstResult
+ * @param maxResults
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
GroupQueryBuilder page(int firstResult, int maxResults) throws
UnsupportedQueryCriterium;
+ /**
+ * Filter resuts by a given attribute values. All values need to be present
+ *
+ * @param attributeName
+ * @param attributeValue
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
GroupQueryBuilder attributeValuesFilter(String attributeName, String[] attributeValue)
throws UnsupportedQueryCriterium;
}
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/Query.java
===================================================================
--- idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/Query.java 2009-06-05
16:22:07 UTC (rev 596)
+++ idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/Query.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -26,6 +26,8 @@
import java.util.List;
/**
+ * Parent Query interface
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QueryBuilder.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QueryBuilder.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QueryBuilder.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -23,6 +23,9 @@
package org.jboss.identity.idm.api.query;
/**
+ * Parent interface for query builders. QueryBuilder exposes methods to set query
conditions. If many conditions are set
+ * logical AND operation will be used to compute results.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QuerySortOrder.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QuerySortOrder.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/QuerySortOrder.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -24,6 +24,8 @@
package org.jboss.identity.idm.api.query;/**
/**
+ * Sort order
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQuery.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQuery.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQuery.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -32,6 +32,8 @@
import java.util.List;
/**
+ * Query for Role objects
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQueryBuilder.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQueryBuilder.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/RoleQueryBuilder.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -28,29 +28,88 @@
import org.jboss.identity.idm.api.IdentityType;
/**
+ * Expose operations to set conditions for Role search and create RoleQuery
+ *
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
public interface RoleQueryBuilder extends QueryBuilder
{
+ /**
+ * Create RoleQuery based on specified conditions
+ * @return
+ */
RoleQuery createQuery();
+ /**
+ * Reset query conditions
+ * @return
+ */
RoleQueryBuilder reset();
+ /**
+ * Search for roles connected with a given user
+ *
+ * @param user
+ * @return
+ */
RoleQueryBuilder setUser(User user);
+ /**
+ * Search for roles connected with a given user
+ *
+ * @param id
+ * @return
+ */
RoleQueryBuilder setUser(String id);
+ /**
+ * Search for roles connected with a given group
+ *
+ * @param group
+ * @return
+ */
RoleQueryBuilder setGroup(Group group);
+ /**
+ * Search for roles connected with a given group
+ *
+ * @param id
+ * @return
+ */
RoleQueryBuilder setGroup(String id);
+ /**
+ * Search for roles with a given RoleType
+ *
+ * @param roleType
+ * @return
+ */
RoleQueryBuilder setRoleType(RoleType roleType);
+ /**
+ * Search for roles with a given RoleType name
+ *
+ * @param string
+ * @return
+ */
RoleQueryBuilder setRoleType(String string);
+ /**
+ * Search for roles connected with a given IdentityType object
+ *
+ * @param identityType
+ * @return
+ */
RoleQueryBuilder setIdentityType(IdentityType identityType);
+ /**
+ * Search for roles connected with a given IdentityType object
+ *
+ * @param id
+ * @return
+ */
RoleQueryBuilder setIdentityTypeId(String id);
}
Modified: idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQuery.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQuery.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQuery.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -30,6 +30,8 @@
import java.util.List;
/**
+ * Query for User objects
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
Modified:
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQueryBuilder.java
===================================================================
---
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQueryBuilder.java 2009-06-05
16:22:07 UTC (rev 596)
+++
idm/trunk/idm-api/src/main/java/org/jboss/identity/idm/api/query/UserQueryBuilder.java 2009-06-09
15:15:52 UTC (rev 597)
@@ -28,50 +28,174 @@
import java.util.Collection;
/**
+ * Expose operations to set conditions for User search and create UserQuery
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
public interface UserQueryBuilder extends QueryBuilder
{
-
+
+ /**
+ * Create UserQuery based on specified conditions
+ * @return
+ */
UserQuery createQuery();
+ /**
+ * Reset all set conditions
+ * @return
+ */
UserQueryBuilder reset();
+ /**
+ * Search for user with a given id
+ * @param id
+ * @return
+ */
UserQueryBuilder withUserId(String id);
+ /**
+ * Search for users associated with a given group
+ *
+ * @param group
+ * @return
+ */
UserQueryBuilder addAssociatedGroup(Group group);
+ /**
+ * Search for users associated with a given group
+ *
+ * @param id
+ * @return
+ */
UserQueryBuilder addAssociatedGroup(String id);
+ /**
+ * Search for users associated with a given groups
+ *
+ * @param groups
+ * @return
+ */
UserQueryBuilder addAssociatedGroups(Collection<Group> groups);
+ /**
+ * Search for users associated with a given groups
+ *
+ * @param groups
+ * @return
+ */
UserQueryBuilder addAssociatedGroupsIds(Collection<String> groups);
+ /**
+ * Search for users that are connected with role with a given group
+ *
+ *
+ * @param group
+ * @return
+ */
UserQueryBuilder addGroupConnectedWithRole(Group group);
+ /**
+ * Search for users that are connected with role with a given group
+ *
+ * @param id
+ * @return
+ */
UserQueryBuilder addGroupConnectedWithRole(String id);
+ /**
+ * Search for users that are connected with role with a given groups
+ *
+ * @param groups
+ * @return
+ */
UserQueryBuilder addGroupsConnectedWithRole(Collection<Group> groups);
+ /**
+ * Search for users that are connected with role with a given group
+ *
+ * @param groups
+ * @return
+ */
UserQueryBuilder addGroupsIdsConnectedWithRole(Collection<String> groups);
+ /**
+ * Search for users that are connected with role or associated with a given group
+ *
+ * @param group
+ * @return
+ */
UserQueryBuilder addRelatedGroup(Group group);
+ /**
+ * Search for users that are connected with role or associated with a given group
+ *
+ * @param id
+ * @return
+ */
UserQueryBuilder addRelatedGroup(String id);
+ /**
+ * Search for users that are connected with role or associated with a given group
+ *
+ * @param group
+ * @return
+ */
UserQueryBuilder addRelatedGroups(Collection<Group> group);
+ /**
+ * Search for users that are connected with role or associated with a given group
+ *
+ * @param ids
+ * @return
+ */
UserQueryBuilder addRelatedGroupsIds(Collection<String> ids);
+ /**
+ * Sort results
+ *
+ * @param order
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
UserQueryBuilder sort(SortOrder order) throws UnsupportedQueryCriterium;
+ /**
+ * Sort results using given attribute name
+ * @param name
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
UserQueryBuilder sortAttributeName(String name) throws UnsupportedQueryCriterium;
+ /**
+ * Return page from results
+ *
+ * @param firstResult
+ * @param maxResults
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
UserQueryBuilder page(int firstResult, int maxResults) throws
UnsupportedQueryCriterium;
+ /**
+ * Filter results using attribute values. All specified values must be present
+ *
+ * @param attributeName
+ * @param attributeValue
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
UserQueryBuilder attributeValuesFilter(String attributeName, String[] attributeValue)
throws UnsupportedQueryCriterium;
+ /**
+ * Filter results using id filter. Wildcard '*' can be used.
+ *
+ * @param idFilter
+ * @return
+ * @throws UnsupportedQueryCriterium
+ */
UserQueryBuilder idFilter(String idFilter) throws UnsupportedQueryCriterium;
}