Author: bdaw
Date: 2008-10-21 06:51:41 -0400 (Tue, 21 Oct 2008)
New Revision: 106
Added:
trunk/identity-api/src/main/java/org/jboss/identity/api/AttributesManager.java
trunk/identity-common/src/main/java/org/jboss/identity/exception/FeatureNotSupportedException.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/AttributesManagerImpl.java
Removed:
trunk/identity-api/src/main/java/org/jboss/identity/api/ProfileManager.java
trunk/identity-api/src/main/java/org/jboss/identity/api/SessionState.java
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/PersistenceManagerNotFoundException.java
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/Group.java
trunk/identity-api/src/main/java/org/jboss/identity/api/GroupType.java
trunk/identity-api/src/main/java/org/jboss/identity/api/Identity.java
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySession.java
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySessionFactory.java
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentityType.java
trunk/identity-api/src/main/java/org/jboss/identity/api/PersistenceManager.java
trunk/identity-api/src/main/java/org/jboss/identity/api/Realm.java
trunk/identity-api/src/main/java/org/jboss/identity/api/RealmManager.java
trunk/identity-api/src/main/java/org/jboss/identity/api/RelationshipManager.java
trunk/identity-api/src/main/java/org/jboss/identity/api/Role.java
trunk/identity-api/src/main/java/org/jboss/identity/api/RoleManager.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/IdentitySessionImpl.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/PersistenceManagerImpl.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/helper/LDAPTools.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/hibernate/HibernateIdentityObjectAttribute.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/ldap/LDAPIdentityObjectRelationshipImpl.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/store/ldap/LDAPIdentityStore.java
trunk/identity-impl/src/test/java/org/jboss/identity/impl/HibernateTestSupport.java
trunk/identity-spi/src/main/java/org/jboss/identity/spi/exception/OperationNotSupportedException.java
trunk/identity-spi/src/main/java/org/jboss/identity/spi/repository/IdentityStoreRepository.java
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/AttributeStore.java
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStore.java
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStoreInvocationContext.java
Log:
Cleanup
Copied: trunk/identity-api/src/main/java/org/jboss/identity/api/AttributesManager.java
(from rev 101,
trunk/identity-api/src/main/java/org/jboss/identity/api/ProfileManager.java)
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/AttributesManager.java
(rev 0)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/AttributesManager.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -0,0 +1,117 @@
+/*
+* 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.api;
+
+import org.jboss.identity.exception.IdentityException;
+
+import java.util.Set;
+import java.util.Map;
+
+/**
+ * All operations on attributes
+ *
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface AttributesManager
+{
+
+ /**
+ * @return Session associated with this object instance
+ */
+ IdentitySession getIdentitySession();
+
+ //TODO: Add FeaturesDescription
+
+ /**
+ * @param identityType
+ * @return names of supported attributes
+ * @throws org.jboss.identity.exception.IdentityException
+ */
+ Set<String> getSupportedAttributeNames(IdentityType identityType)
+ throws IdentityException;
+
+ /**
+ * Get attributes for the given IdentityType
+ *
+ * @param identity
+ * @return
+ * @throws org.jboss.identity.exception.IdentityException
+ */
+ Map<String, String[]> getAttributes(IdentityType identity) throws
IdentityException;
+
+ /**
+ * Update attributes with new values - previous values will be overwritten. All the
other attributes are not changed -
+ * method doesn't overwrite whole attribute set connected with a given
IdentityType object.
+ * @param identity
+ * @param attributes
+ * @throws org.jboss.identity.exception.IdentityException
+ */
+ void updateAttributes(IdentityType identity, Map<String, String[]> attributes)
+ throws IdentityException;
+
+ /**
+ * Add new attributes - if attribute with given name already exists the values
+ * will be appended
+ *
+ * @param identity
+ * @param attributes
+ * @throws org.jboss.identity.exception.IdentityException
+ */
+ void addAttributes(IdentityType identity, Map<String, String[]> attributes)
+ throws IdentityException;
+
+ /**
+ * Remove attributes
+ *
+ * @param identity
+ * @param attributes
+ */
+ void removeAttributes(IdentityType identity, Set<String> attributes)
+ throws IdentityException;
+
+ /**
+ * @param identity
+ * @return
+ * @throws IdentityException
+ */
+ boolean hasPasswordAttribute(Identity identity) throws IdentityException;
+
+ /**
+ *
+ * @param identity
+ * @param password
+ * @return
+ * @throws IdentityException
+ */
+ boolean validatePasswordAttribute(Identity identity, String password) throws
IdentityException;
+
+ /**
+ *
+ * @param identity
+ * @param password
+ * @throws IdentityException
+ */
+ void updatePasswordAttribute(Identity identity, String password) throws
IdentityException;
+
+}
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/Group.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/Group.java 2008-10-18 21:35:12
UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/Group.java 2008-10-21 10:51:41
UTC (rev 106)
@@ -26,6 +26,7 @@
/**
* Represents a Group
+ *
* @author Anil.Saldhana(a)redhat.com
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @since Jul 9, 2008
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/GroupType.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/GroupType.java 2008-10-18
21:35:12 UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/GroupType.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -23,6 +23,7 @@
/**
* Type of Group
+ *
* @author Anil.Saldhana(a)redhat.com
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @since Jul 11, 2008
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/Identity.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/Identity.java 2008-10-18
21:35:12 UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/Identity.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -23,6 +23,7 @@
/**
* Represents an Identity
+ *
* @author Anil.Saldhana(a)redhat.com
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @since Jun 30, 2008
@@ -30,16 +31,4 @@
public interface Identity extends IdentityType
{
- /**
- * <p>Return the name of the identity</p>
- * @return
- */
- String getName();
-
- /**
- * Whether this is a virtual
- * identity (such as a pseudonym)
- * @return true (virtual identity)
- */
- boolean isVirtual();
}
\ No newline at end of file
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySession.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySession.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySession.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -23,6 +23,7 @@
import org.jboss.identity.exception.IdentityException;
+import org.jboss.identity.exception.FeatureNotSupportedException;
/**
* Expose all identity management operations within a given realm
@@ -69,32 +70,37 @@
/**
* @return
+ * @throws IdentityException
*/
- Transaction beginTransaction();
+ Transaction beginTransaction() throws IdentityException;
/**
* Transaction instance assosiated with this session
* @return
*/
- Transaction getTransaction();
+ Transaction getTransaction() throws IdentityException;
/**
+ * PersistenceManager exposes management operations on Group and Identity objects
* @return
*/
PersistenceManager getPersistenceManager();
/**
+ * RelationshipManager enables to associate and disassociate Group and Identity
objects
* @return
*/
RelationshipManager getRelationshipManager();
/**
+ * RoleManager exposes operation on Role objects. This is optional feature that may be
not supported
* @return
+ * @throws FeatureNotSupportedException
*/
- ProfileManager getProfileManager();
+ AttributesManager getProfileManager();
//TODO: proper exception if roles are not supported
- RoleManager getRoleManager();
+ RoleManager getRoleManager() throws FeatureNotSupportedException ;
}
\ No newline at end of file
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySessionFactory.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySessionFactory.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/IdentitySessionFactory.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -23,6 +23,8 @@
package org.jboss.identity.api;
/**
+ * Creates IdentitySession objects for a given Realm.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
@@ -39,7 +41,7 @@
boolean isClosed();
/**
- * Create a Session
+ * Create IdentitySession
* @return
*/
IdentitySession createIdentitySession(String realmName);
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/IdentityType.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/IdentityType.java 2008-10-18
21:35:12 UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/IdentityType.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -34,13 +34,18 @@
public interface IdentityType
{
/**
- * @return id of this identity object
+ * @return id of this IdentityType object
*/
Object getId();
/**
- * @return description
+ * @return the name of the IdentityType
*/
+ String getName();
+
+ /**
+ * @return description of the IdentityType
+ */
String getDescription();
}
\ No newline at end of file
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/PersistenceManager.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/PersistenceManager.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/PersistenceManager.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -28,6 +28,8 @@
import java.util.Map;
/**
+ * Exposes all management operations on Group and Identity objects.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
@@ -39,17 +41,21 @@
*/
IdentitySession getIdentitySession();
+
+ //TODO: Add FeaturesDescription
+
// Create
/**
* <p>Create an identity in the realm</p>
* @param identityName
+ * @throws IdentityException
* @return
*/
Identity createIdentity(String identityName) throws IdentityException;
/**
- * Create a group of a particular type
+ * <p>Create a group of a particular type</p>
* @param groupName
* @param groupType
* @return
@@ -79,18 +85,6 @@
*/
void removeGroup(Group group, boolean force) throws IdentityException;
-
- // Refresh
-
- /**
- * Objects like Identity and Group can be simple pojos. This method should be used to
update DisplayName or Description
- * values from the underlying store.
- * @param it
- * @throws IdentityException
- */
- void refreshIdentityType(IdentityType it) throws IdentityException;
-
-
// Search
/**
@@ -129,14 +123,14 @@
/**
* Find identities with a given type paginated and ordered.
* If the paginatedSearch or orderedSearch operations
- * are not supported in this store implementation, dedicated
+ * are not supported, dedicated
* parameters will take no effect
*
* @param filterName can be null
* @param offset
* @param limit 0 means unlimited page size
* @param orderedByName
- * @param ascending default true
+ * @param ascending
* @return
* @throws org.jboss.identity.exception.IdentityException
*/
@@ -147,14 +141,14 @@
/**
* Find identities with a given attributes values. If the paginatedSearch or
* orderedSearch operations
- * are not supported in this store implementation, dedicated parameters will take no
effect
+ * are not supported, dedicated parameters will take no effect
*
* @param filterName can be null
* @param attributes
* @param offset
* @param limit 0 means unlimited page size
* @param orderedByName
- * @param ascending default true
+ * @param ascending
* @return
* @throws org.jboss.identity.exception.IdentityException
*/
@@ -165,7 +159,7 @@
// Search Groups
/**
- * Find group with a given name
+ * Find group with a given name and type
*
* @param name
* @param groupType
@@ -186,7 +180,7 @@
/**
* Find group with a given type paginated and ordered.
* If the paginatedSearch or orderedSearch operations
- * are not supported in this store implementation, dedicated
+ * are not supported, dedicated
* parameters will take no effect
*
* @param groupType
@@ -194,7 +188,7 @@
* @param offset
* @param limit 0 means unlimited page size
* @param orderedByName can be null
- * @param ascending default true
+ * @param ascending
* @return
* @throws org.jboss.identity.exception.IdentityException
*/
@@ -206,14 +200,14 @@
/**
* Find group with a given attributes values. If the paginatedSearch or
* orderedSearch operations
- * are not supported in this store implementation, dedicated parameters will take no
effect
+ * are not supported, dedicated parameters will take no effect
*
* @param groupType
* @param attributes
* @param offset
* @param limit 0 means unlimited page size
* @param orderedByName can be null
- * @param ascending default true
+ * @param ascending
* @return
* @throws org.jboss.identity.exception.IdentityException
*/
@@ -221,4 +215,15 @@
int offset, int limit,
boolean orderedByName, boolean ascending) throws
IdentityException;
+ /**
+ * Whether Identity is a virtual
+ * (such as a pseudonym)
+ * @return true (virtual identity)
+ */
+ boolean isVirtual(Identity identity);
+
+
+
+
+
}
Deleted: trunk/identity-api/src/main/java/org/jboss/identity/api/ProfileManager.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/ProfileManager.java 2008-10-18
21:35:12 UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/ProfileManager.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -1,87 +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.identity.api;
-
-import org.jboss.identity.exception.IdentityException;
-
-import java.util.Set;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
- * @version : 0.1 $
- */
-public interface ProfileManager
-{
-
- /**
- * @return Session associated with this object instance
- */
- IdentitySession getIdentitySession();
-
- /**
- * @param identityType
- * @return names of supported attributes
- * @throws org.jboss.identity.exception.IdentityException
- */
- Set<String> getSupportedAttributeNames(IdentityType identityType)
- throws IdentityException;
-
- /**
- * Get attributes for the given identity
- *
- * @param identity
- * @return
- * @throws org.jboss.identity.exception.IdentityException
- */
- Map<String, String[]> getAttributes(IdentityType identity) throws
IdentityException;
-
- /**
- * Update attributes with new values - previous values will be overwritten
- * @param identity
- * @param attributes
- * @throws org.jboss.identity.exception.IdentityException
- */
- void updateAttributes(IdentityType identity, Map<String, String[]> attributes)
- throws IdentityException;
-
- /**
- * Add new attributes - if attribute with given name already exists the values
- * will be appended
- *
- * @param identity
- * @param attributes
- * @throws org.jboss.identity.exception.IdentityException
- */
- void addAttributes(IdentityType identity, Map<String, String[]> attributes)
- throws IdentityException;
-
- /**
- * Remove attributes
- *
- * @param identity
- * @param attributes
- */
- void removeAttributes(IdentityType identity, Set<String> attributes)
- throws IdentityException;
-}
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/Realm.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/Realm.java 2008-10-18 21:35:12
UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/Realm.java 2008-10-21 10:51:41
UTC (rev 106)
@@ -22,8 +22,7 @@
package org.jboss.identity.api;
/**
- * <p>The <b>realm</b> under which the various models and policies
- * are applicable.</p>
+ * <p>The <b>realm</b> contain configuration of a set of identity data
providers</p>
* @author Anil.Saldhana(a)redhat.com
* @since Jul 9, 2008
*/
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/RealmManager.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/RealmManager.java 2008-10-18
21:35:12 UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/RealmManager.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -22,13 +22,13 @@
package org.jboss.identity.api;
-import org.jboss.identity.api.exception.PersistenceManagerNotFoundException;
-import org.jboss.identity.api.exception.SessionNotOpenException;
+import org.jboss.identity.exception.IdentityException;
import java.io.InputStream;
/**
- * All operations connected with realms. Because operations on realms are not often there
is no transaction support.
+ * 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 $
@@ -44,7 +44,7 @@
* @param realmName
* @return
*/
- Realm bootstrap(String realmName);
+ Realm bootstrap(String realmName) throws IdentityException;
/**
* <p>Bootstrap a realm given a configuration</p>
@@ -52,34 +52,29 @@
* @param config
* @return
*/
- Realm bootstrap(String realmName, InputStream config);
+ Realm bootstrap(String realmName, InputStream config) throws IdentityException;
/**
* <p>Associate a relationship between two realms</p>
* @param realmA
* @param realmB
- * @throws org.jboss.identity.api.exception.PersistenceManagerNotFoundException PM not
set
- * @throws org.jboss.identity.api.exception.SessionNotOpenException session is not
open
- */
- void associate(Realm realmA, Realm realmB)
- throws PersistenceManagerNotFoundException, SessionNotOpenException;
+ */
+ void associate(Realm realmA, Realm realmB) throws IdentityException;
+
/**
* <p>Disassociate a relationship between two realms</p>
* @param realmA
* @param realmB
- * @throws PersistenceManagerNotFoundException PM not set
- * @throws SessionNotOpenException session is not open
*/
- void disassociate(Realm realmA, Realm realmB)
- throws PersistenceManagerNotFoundException,SessionNotOpenException;
+ 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);
+ boolean isAssosiated(Realm fromRealm, Realm toRealm) throws IdentityException;
/**
* <p>Return a realm</p>
@@ -87,6 +82,6 @@
* @param shouldBootstrap Should we bootstrap if a realm does not exist?
* @return
*/
- Realm getRealm(String realmName, boolean shouldBootstrap);
+ Realm getRealm(String realmName, boolean shouldBootstrap) throws IdentityException;
}
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/RelationshipManager.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/RelationshipManager.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/RelationshipManager.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -27,6 +27,8 @@
import java.util.Collection;
/**
+ * Management of relationships between Identity and Group objects.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
@@ -38,6 +40,8 @@
*/
IdentitySession getIdentitySession();
+ //TODO: Add FeaturesDescription
+
// Assignation
/**
@@ -109,9 +113,9 @@
/**
* Find groups that are associated with given group.
* If the paginatedSearch or orderedSearch operations
- * are not supported in this store implementation, dedicated parameters will
+ * are not supported, dedicated parameters will
* take no effect. If 'parent' parameter is set to false, all parent group
will be returned. If parent parameter is
- * set to true (default) and 'inherited' is set to true all nested subgroubs
will be returned.
+ * set to true and 'inherited' is set to true all nested subgroubs will be
returned.
*
* @param group parent group
* @param groupType can be null
@@ -122,7 +126,7 @@
* @param offset
* @param limit 0 means unlimited page size
* @param orderedByAttributeName can be null
- * @param ascending default true
+ * @param ascending
* @return
* @throws org.jboss.identity.exception.IdentityException
*/
@@ -137,7 +141,7 @@
/**
* Find all groups that given identity is associated with.
* If the paginatedSearch or orderedSearch operations
- * are not supported in this store implementation, dedicated parameters will
+ * are not supported, dedicated parameters will
* take no effect
*
* @param identity child identity
@@ -145,7 +149,7 @@
* @param offset
* @param limit 0 means unlimited page size
* @param orderedByAttributeName can be null
- * @param ascending default true
+ * @param ascending
* @return
* @throws org.jboss.identity.exception.IdentityException
*/
@@ -162,11 +166,11 @@
* take no effect
*
* @param group parent group
- * @param inherited if true also identities from subgroubs will be retreived. Default
is false
+ * @param inherited if true also identities from subgroubs will be retrieved. Default
is false
* @param offset
* @param limit 0 means unlimited page size
* @param orderedByAttributeName can be null
- * @param ascending default true
+ * @param ascending
* @return
* @throws org.jboss.identity.exception.IdentityException
*/
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/Role.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/Role.java 2008-10-18 21:35:12
UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/Role.java 2008-10-21 10:51:41
UTC (rev 106)
@@ -23,8 +23,9 @@
/**
- * Marker Interface represents a role
- * @author Anil.Saldhana(a)redhat.com
+ * 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.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @since Jun 30, 2008
*/
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/RoleManager.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/RoleManager.java 2008-10-18
21:35:12 UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/RoleManager.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -29,6 +29,9 @@
import java.util.List;
/**
+ * Management operations on Role objects. Role support is optional and depends on the
capabilities of the underlying
+ * configured identity stores capabilities.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
@@ -40,6 +43,8 @@
*/
IdentitySession getIdentitySession();
+ //TODO: Add FeaturesDescription
+
// RoleType
/**
Deleted: trunk/identity-api/src/main/java/org/jboss/identity/api/SessionState.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/SessionState.java 2008-10-18
21:35:12 UTC (rev 105)
+++ trunk/identity-api/src/main/java/org/jboss/identity/api/SessionState.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.api;
-
-/**
- * Current State of the Session
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 22, 2008
- */
-public enum SessionState
-{
- OPEN, CLOSED, ACTIVE;
-}
\ No newline at end of file
Deleted:
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/PersistenceManagerNotFoundException.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/PersistenceManagerNotFoundException.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/PersistenceManagerNotFoundException.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.api.exception;
-
-import org.jboss.identity.exception.IdentityException;
-
-/**
- * Exception indicating the non-availability
- * of a Persistence Manager
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 10, 2008
- */
-public class PersistenceManagerNotFoundException extends IdentityException
-{
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
Deleted:
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/exception/SessionNotOpenException.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.api.exception;
-
-import org.jboss.identity.exception.IdentityException;
-
-/**
- * Exception indicating that no session
- * is open
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 10, 2008
- */
-public class SessionNotOpenException extends IdentityException
-{
- private static final long serialVersionUID = 1L;
-}
\ No newline at end of file
Added:
trunk/identity-common/src/main/java/org/jboss/identity/exception/FeatureNotSupportedException.java
===================================================================
---
trunk/identity-common/src/main/java/org/jboss/identity/exception/FeatureNotSupportedException.java
(rev 0)
+++
trunk/identity-common/src/main/java/org/jboss/identity/exception/FeatureNotSupportedException.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -0,0 +1,50 @@
+/*
+* 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.exception;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class FeatureNotSupportedException extends Exception
+{
+ public FeatureNotSupportedException()
+ {
+ super();
+ }
+
+ public FeatureNotSupportedException(String message)
+ {
+ super(message);
+ }
+
+ public FeatureNotSupportedException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public FeatureNotSupportedException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Copied:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/AttributesManagerImpl.java
(from rev 105,
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/ProfileManagerImpl.java)
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/AttributesManagerImpl.java
(rev 0)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/AttributesManagerImpl.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -0,0 +1,129 @@
+/*
+* 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.impl.api;
+
+import org.jboss.identity.api.IdentitySession;
+import org.jboss.identity.api.AttributesManager;
+import org.jboss.identity.api.IdentityType;
+import org.jboss.identity.api.Identity;
+import org.jboss.identity.exception.IdentityException;
+import org.jboss.identity.impl.NotYetImplementedException;
+
+import java.util.Set;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.HashSet;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class AttributesManagerImpl extends AbstractManager implements AttributesManager
+{
+ public AttributesManagerImpl(IdentitySession session)
+ {
+ super(session);
+ }
+
+ //TODO: fix to have similar signatures in API/SPI for String[] and avoid unnesesary
iterations
+
+ public Set<String> getSupportedAttributeNames(IdentityType identityType) throws
IdentityException
+ {
+ return getRepository().getSupportedAttributeNames(getInvocationContext(),
createIdentityObject(identityType).getIdentityType());
+ }
+
+ public Map<String, String[]> getAttributes(IdentityType identity) throws
IdentityException
+ {
+ Map<String, Set<String>> attributes =
getRepository().getAttributes(getInvocationContext(), createIdentityObject(identity));
+
+ Map<String, String[]> attrs = new HashMap<String, String[]>();
+
+ for (Map.Entry<String, Set<String>> entry : attributes.entrySet())
+ {
+ attrs.put(entry.getKey(), entry.getValue().toArray(new
String[entry.getValue().size()]));
+ }
+
+ return attrs;
+ }
+
+ public void updateAttributes(IdentityType identity, Map<String, String[]>
attributes) throws IdentityException
+ {
+ Map<String, Set<String>> attrs = new HashMap<String,
Set<String>>();
+
+ for (Map.Entry<String, String[]> entry : attributes.entrySet())
+ {
+ Set<String> vals = new HashSet<String>();
+ for (String s : entry.getValue())
+ {
+ vals.add(s);
+ }
+
+ attrs.put(entry.getKey(),vals);
+ }
+
+ getRepository().updateAttributes(getInvocationContext(),
createIdentityObject(identity), attrs);
+
+ }
+
+ public void addAttributes(IdentityType identity, Map<String, String[]>
attributes) throws IdentityException
+ {
+ Map<String, Set<String>> attrs = new HashMap<String,
Set<String>>();
+
+ for (Map.Entry<String, String[]> entry : attributes.entrySet())
+ {
+ Set<String> vals = new HashSet<String>();
+ for (String s : entry.getValue())
+ {
+ vals.add(s);
+ }
+
+ attrs.put(entry.getKey(),vals);
+ }
+
+ getRepository().addAttributes(getInvocationContext(),
createIdentityObject(identity), attrs);
+ }
+
+ public void removeAttributes(IdentityType identity, Set<String> attributes)
throws IdentityException
+ {
+ getRepository().removeAttributes(getInvocationContext(),
createIdentityObject(identity), attributes);
+
+ }
+
+ public boolean hasPasswordAttribute(Identity identity) throws IdentityException
+ {
+ //TODO:NYI
+ throw new NotYetImplementedException();
+ }
+
+ public boolean validatePasswordAttribute(Identity identity, String password) throws
IdentityException
+ {
+ //TODO:NYI
+ throw new NotYetImplementedException();
+ }
+
+ public void updatePasswordAttribute(Identity identity, String password) throws
IdentityException
+ {
+ //TODO:NYI
+ throw new NotYetImplementedException();
+ }
+}
Modified:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/IdentitySessionImpl.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/IdentitySessionImpl.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/IdentitySessionImpl.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -26,7 +26,7 @@
import org.jboss.identity.api.Transaction;
import org.jboss.identity.api.PersistenceManager;
import org.jboss.identity.api.RelationshipManager;
-import org.jboss.identity.api.ProfileManager;
+import org.jboss.identity.api.AttributesManager;
import org.jboss.identity.api.RoleManager;
import org.jboss.identity.exception.IdentityException;
@@ -46,7 +46,7 @@
private final RelationshipManager relationshipManager;
- private final ProfileManager profileManager;
+ private final AttributesManager profileManager;
private final RoleManager roleManager;
@@ -65,7 +65,7 @@
this.sessionWrappers = sessionWrappers;
this.persistenceManager = new PersistenceManagerImpl(this);
this.relationshipManager = new RelationshipManagerImpl(this);
- this.profileManager = new ProfileManagerImpl(this);
+ this.profileManager = new AttributesManagerImpl(this);
this.roleManager = new RoleManagerImpl(this);
@@ -134,7 +134,7 @@
return relationshipManager;
}
- public ProfileManager getProfileManager()
+ public AttributesManager getProfileManager()
{
return profileManager;
}
Modified:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/PersistenceManagerImpl.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/PersistenceManagerImpl.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/api/PersistenceManagerImpl.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -32,6 +32,7 @@
import org.jboss.identity.spi.model.IdentityObjectType;
import org.jboss.identity.spi.model.IdentityObject;
import org.jboss.identity.impl.types.SimpleIdentityObject;
+import org.jboss.identity.impl.NotYetImplementedException;
import java.util.Collection;
import java.util.Map;
@@ -84,11 +85,6 @@
getRepository().removeIdentityObject(getInvocationContext(),
createIdentityObject(group));
}
- public void refreshIdentityType(IdentityType it) throws IdentityException
- {
- //TODO: remove this method from the interface
- }
-
public int getIdentityCount() throws IdentityException
{
IdentityObjectType iot = getIdentityObjectType();
@@ -179,4 +175,10 @@
return groups;
}
+
+ public boolean isVirtual(Identity identity)
+ {
+ //TODO:NYI
+ throw new NotYetImplementedException();
+ }
}
Modified: trunk/identity-impl/src/main/java/org/jboss/identity/impl/helper/LDAPTools.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/helper/LDAPTools.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/helper/LDAPTools.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -42,8 +42,6 @@
{
throw new IllegalArgumentException("Cannot process empty dn");
}
- String name = null;
-
String[] parts = dn.split(",");
parts = parts[0].split("=");
@@ -55,24 +53,4 @@
return parts[1];
}
- /**
- * Simple encoding to make a name rfc 2253 compiliant. For now it just escapes the
special chars listed in rfc
- * with backslash.
- * @param name
- * @return
- */
- public static String encodeRfc2253Name(String name)
- {
- //TODO: fully cover 2253 encoding
-
- //TODO: backslash
- //name = name.replaceAll("\\","");
- name = name.replaceAll(",","\\\\\\,");
- name = name.replaceAll("\\+","\\\\\\+");
- name = name.replaceAll("\"","\\\\\"");
- name = name.replaceAll("<","\\\\\\<");
- name = name.replaceAll(">","\\\\\\>");
- name = name.replaceAll(";","\\\\\\;");
- return name;
- }
}
Modified:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/hibernate/HibernateIdentityObjectAttribute.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/hibernate/HibernateIdentityObjectAttribute.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/hibernate/HibernateIdentityObjectAttribute.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -23,6 +23,7 @@
package org.jboss.identity.impl.model.hibernate;
import org.hibernate.annotations.CollectionOfElements;
+import org.jboss.identity.spi.model.IdentityObjectAttribute;
import javax.persistence.Entity;
import javax.persistence.Table;
@@ -39,7 +40,7 @@
*/
@Entity
@Table(name = "identity_obj_attrs")
-public class HibernateIdentityObjectAttribute
+public class HibernateIdentityObjectAttribute implements IdentityObjectAttribute
{
@Id
@GeneratedValue
Modified:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/ldap/LDAPIdentityObjectRelationshipImpl.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/ldap/LDAPIdentityObjectRelationshipImpl.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/ldap/LDAPIdentityObjectRelationshipImpl.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -52,7 +52,7 @@
public String getName()
{
- return null;
+ return name;
}
public IdentityObjectRelationshipType getType()
@@ -69,11 +69,11 @@
public IdentityObject getFromIdentityObject()
{
- return null;
+ return from;
}
public IdentityObject getToIdentityObject()
{
- return null;
+ return to;
}
}
Modified:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/store/ldap/LDAPIdentityStore.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/store/ldap/LDAPIdentityStore.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/store/ldap/LDAPIdentityStore.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -150,8 +150,6 @@
// Make it RFC 2253 compliant
LdapName validLDAPName = new LdapName(getTypeConfiguration(invocationCtx,
type).getIdAttributeName().concat("=").concat(name));
- //String rdn = getTypeConfiguration(invocationCtx,
type).getIdAttributeName().concat("=").concat(validLDAPName.toString());
-
log.finer("creating ldap entry for: " + validLDAPName + "; "
+ attrs);
ctx.createSubcontext(validLDAPName, attrs);
}
Modified:
trunk/identity-impl/src/test/java/org/jboss/identity/impl/HibernateTestSupport.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/identity/impl/HibernateTestSupport.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-impl/src/test/java/org/jboss/identity/impl/HibernateTestSupport.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -38,7 +38,7 @@
*/
public class HibernateTestSupport
{
- private static Logger logger =
Logger.getLogger(HibernateTestSupport.class.getName());
+ private static Logger logger =
Logger.getLogger(HibernateTestSupport.class.getName());
private HibernateEntityManagerFactory emFactory;
@@ -66,7 +66,7 @@
try {
logger.info("Starting in-memory HSQL database for unit tests");
Class.forName("org.hsqldb.jdbcDriver");
- connection =
DriverManager.getConnection("jdbc:hsqldb:mem:unit-testing-jpa", "sa",
"");
+ connection = DriverManager.getConnection("jdbc:hsqldb:mem:" +
databaseName, "sa", "");
}
catch (Exception ex)
{
@@ -77,7 +77,7 @@
try
{
logger.info("Building JPA EntityManager for unit tests");
- emFactory =
(HibernateEntityManagerFactory)Persistence.createEntityManagerFactory("jboss-identity-model");
+ emFactory =
(HibernateEntityManagerFactory)Persistence.createEntityManagerFactory(persistenceUnit);
em = (HibernateEntityManager)emFactory.createEntityManager();
}
catch (Exception ex)
Deleted:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.spi.attribute;
-
-import java.util.Date;
-
-import org.jboss.identity.spi.model.IdentityObjectType;
-import org.jboss.identity.spi.model.IdentityObjectAttribute;
-import org.jboss.identity.spi.policy.PasswordExpirationPolicy;
-
-/**
- * Represents a password
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 13, 2008
- */
-public class PasswordAttribute<T extends IdentityObjectType>
-implements IdentityObjectAttribute
-{
- /**
- * Password policy governing this attribute.
- * A null value indicates that there is no policy.
- */
- protected PasswordExpirationPolicy<T> passwordPolicy;
-
- /**
- * Get the date time when the password was last updated.
- * The update can be based on password expiration.
- */
- protected Date lastUpdated = new Date();
-
- public PasswordAttribute()
- {
- }
-
- public PasswordAttribute(PasswordExpirationPolicy<T> aPasswordPolicy)
- {
- this.passwordPolicy = aPasswordPolicy;
- }
-
- public PasswordExpirationPolicy<T> getPasswordPolicy()
- {
- return passwordPolicy;
- }
-
- public void setPasswordPolicy(PasswordExpirationPolicy<T> passwordPolicy)
- {
- this.passwordPolicy = passwordPolicy;
- }
-
-
-}
\ No newline at end of file
Modified:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/exception/OperationNotSupportedException.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/exception/OperationNotSupportedException.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/exception/OperationNotSupportedException.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -22,8 +22,6 @@
package org.jboss.identity.spi.exception;
-import org.jboss.identity.exception.IdentityException;
-
/**
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
Modified:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/repository/IdentityStoreRepository.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/repository/IdentityStoreRepository.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/repository/IdentityStoreRepository.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -34,7 +34,9 @@
* IdentityStoreRepository exposes identity object management
* operations and act as an entry point to many underlying data stores.
* Its responsibility is to map identity objects, their state and relations
- * between them across different identity stores.
+ * between them across different identity stores. By extending IdentityStore
+ * interface it exposes unified entry point
+ * for all identity related operations in the SPI
* @author boleslaw dot dawidowicz at redhat anotherdot com
* @author Anil.Saldhana(a)redhat.com
* @since Jul 10, 2008
Modified:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/AttributeStore.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/AttributeStore.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/AttributeStore.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -31,7 +31,7 @@
/**
* Store for identity related attributes. Its separate interface as there is possible
need to store profiles in a
- * distributted way (part in LDAP part in DB).
+ * distributted way (part in LDAP part in DB).
*
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
Modified:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStore.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStore.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStore.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -34,7 +34,7 @@
import org.jboss.identity.exception.IdentityException;
/**
- * Represents an Identity Store
+ * Represents an Identity Store. Implementation of this interface perform operations on
real identity storage like DB or LDAP
*
* @author boleslaw dot dawidowicz at redhat anotherdot com
* @author Anil.Saldhana(a)redhat.com
Modified:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStoreInvocationContext.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStoreInvocationContext.java 2008-10-18
21:35:12 UTC (rev 105)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityStoreInvocationContext.java 2008-10-21
10:51:41 UTC (rev 106)
@@ -23,6 +23,9 @@
package org.jboss.identity.spi.store;
/**
+ * IdentityStoreInvocationContext is passed to the IdentityStore methods. It enables
IdentityStore to not be aware
+ * about current session connected with method invocation.
+ *
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/