From jboss-identity-commits at lists.jboss.org Wed Sep 10 15:23:09 2008 Content-Type: multipart/mixed; boundary="===============8641310032451847063==" MIME-Version: 1.0 From: jboss-identity-commits at lists.jboss.org To: jboss-identity-commits at lists.jboss.org Subject: [jboss-identity-commits] JBoss Identity SVN: r72 - in trunk: identity-spi/src/main/java/org/jboss/identity/spi and 3 other directories. Date: Wed, 10 Sep 2008 15:22:59 -0400 Message-ID: --===============8641310032451847063== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2008-09-10 15:22:59 -0400 (Wed, 10 Sep 2008) New Revision: 72 Added: trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuration/ trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuration/Co= nfigurationService.java trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuration/Pr= opertyGroup.java trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/AttributeS= tore.java Modified: trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identit= yObject.java trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identit= yObjectAttribute.java trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identit= yObjectRelationshipType.java trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identit= yObjectType.java trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/Passwo= rdAttribute.java trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentitySt= ore.java Log: - few more cleanups - Simple ConfigurationService - Separate AttributeStore Modified: trunk/identity-model/src/main/java/org/jboss/identity/model/core/= IdentityObject.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObject.java 2008-09-10 16:04:34 UTC (rev 71) +++ trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObject.java 2008-09-10 19:22:59 UTC (rev 72) @@ -22,8 +22,6 @@ = package org.jboss.identity.model.core; = -import org.jboss.identity.model.core.IdentityObjectType; -import org.jboss.identity.model.core.IdentityObjectAttribute; import org.jboss.identity.exception.PolicyValidationException; = import java.util.List; Modified: trunk/identity-model/src/main/java/org/jboss/identity/model/core/= IdentityObjectAttribute.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObjectAttribute.java 2008-09-10 16:04:34 UTC (rev 71) +++ trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObjectAttribute.java 2008-09-10 19:22:59 UTC (rev 72) @@ -26,6 +26,7 @@ /** * An attribute of an identity * @author Anil.Saldhana(a)redhat.com + * @author Boleslaw D= awidowicz * @since Jun 30, 2008 */ public interface IdentityObjectAttribute Modified: trunk/identity-model/src/main/java/org/jboss/identity/model/core/= IdentityObjectRelationshipType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObjectRelationshipType.java 2008-09-10 16:04:34 UTC (rev 71) +++ trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObjectRelationshipType.java 2008-09-10 19:22:59 UTC (rev 72) @@ -22,7 +22,7 @@ package org.jboss.identity.model.core; = /** - * Defines a relationship between groups, domains etc + * @author Boleslaw D= awidowicz * @author Anil.Saldhana(a)redhat.com * @since Jul 9, 2008 */ Modified: trunk/identity-model/src/main/java/org/jboss/identity/model/core/= IdentityObjectType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObjectType.java 2008-09-10 16:04:34 UTC (rev 71) +++ trunk/identity-model/src/main/java/org/jboss/identity/model/core/Identi= tyObjectType.java 2008-09-10 19:22:59 UTC (rev 72) @@ -25,8 +25,6 @@ = = /** - * Marker Interface representing - * an object of the Identity Model * @author Anil.Saldhana(a)redhat.com * @author Boleslaw D= awidowicz * @since Jul 10, 2008 Modified: trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute= /PasswordAttribute.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/Passw= ordAttribute.java 2008-09-10 16:04:34 UTC (rev 71) +++ trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/Passw= ordAttribute.java 2008-09-10 19:22:59 UTC (rev 72) @@ -22,10 +22,8 @@ package org.jboss.identity.spi.attribute; = import java.util.Date; -import java.util.Set; = import org.jboss.identity.model.core.IdentityObjectType; -import org.jboss.identity.model.core.IdentityObjectType; import org.jboss.identity.model.core.IdentityObjectAttribute; import org.jboss.identity.spi.policy.PasswordExpirationPolicy; = Added: trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuratio= n/ConfigurationService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuration/C= onfigurationService.java (rev 0) +++ trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuration/C= onfigurationService.java 2008-09-10 19:22:59 UTC (rev 72) @@ -0,0 +1,59 @@ +/* +* 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.spi.configuration; + +import java.util.Set; +import java.util.Map; +import java.util.Collection; + +/** + * + * Main entry point to grab configuration information + * + * //TODO: Should this be readonly (bootstrapped once) or expose setters a= lso + * + * @author Boleslaw D= awidowicz + * @version : 0.1 $ + */ +public interface ConfigurationService +{ + /** + * @return group of global properties + */ + PropertyGroup getProperties(); + + /** + * @param groupName + * @return group of properties under given namespace + */ + PropertyGroup getProperties(String groupName); + + /** + * @return all property groups + */ + Collection getPropertyGroups(); + + + + +} Added: trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuratio= n/PropertyGroup.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuration/P= ropertyGroup.java (rev 0) +++ trunk/identity-spi/src/main/java/org/jboss/identity/spi/configuration/P= ropertyGroup.java 2008-09-10 19:22:59 UTC (rev 72) @@ -0,0 +1,41 @@ +/* +* 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.spi.configuration; + +import java.util.Set; +import java.util.Map; + +/** + * Group of multivalued properties + * = + * @author Boleslaw D= awidowicz + * @version : 0.1 $ + */ +public interface PropertyGroup +{ + + Map> getProperties(); + + Set getPropertyValues(String name); + +} Added: trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/Attrib= uteStore.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/Attribute= Store.java (rev 0) +++ trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/Attribute= Store.java 2008-09-10 19:22:59 UTC (rev 72) @@ -0,0 +1,88 @@ +/* +* 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.spi.store; + +import org.jboss.identity.model.core.IdentityObjectType; +import org.jboss.identity.model.core.IdentityObject; +import org.jboss.identity.exception.IdentityException; + +import java.util.Set; +import java.util.Map; + +/** + * Store for identity related attributes. Its separat interface as there i= s possible need to store profiles in a + * distributted way (part in LDAP part in DB). + * = + * @author Boleslaw D= awidowicz + * @version : 0.1 $ + */ +public interface AttributeStore +{ + + /** + * @param identityType + * @return names of supported attributes + * @throws org.jboss.identity.exception.IdentityException + */ + Set getSupportedAttributeNames(T= identityType) + throws IdentityException; + + /** + * Get attributes for the given identity + * + * @param identity + * @return + * @throws IdentityException + */ + Map getAttributes(IdentityObject identity) throws Ide= ntityException; + + /** + * Update attributes with new values - previous values will be overwrit= ten + * @param identity + * @param attributes + * @throws IdentityException + */ + void updateAttributes(IdentityObject identity, Map at= tributes) + throws IdentityException; + + /** + * Add new attributes - if attribute with given name already exists the= values + * will be appended + * + * @param identity + * @param attributes + * @throws IdentityException + */ + void addAttributes(IdentityObject identity, Map attri= butes) + throws IdentityException; + + /** + * Remove attributes + * + * @param identity + * @param attributes + */ + void removeAttributes(IdentityObject identity, Set attributes) + throws IdentityException; + +} Modified: trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/Ide= ntityStore.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityS= tore.java 2008-09-10 16:04:34 UTC (rev 71) +++ trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/IdentityS= tore.java 2008-09-10 19:22:59 UTC (rev 72) @@ -37,7 +37,7 @@ * @author Anil.Saldhana(a)redhat.com * @since Jul 10, 2008 */ -public interface IdentityStore +public interface IdentityStore extends AttributeStore { /** * Set up the store @@ -166,53 +166,9 @@ String orderedByAttributeName, = boolean ascending) throws Identity= Exception; = - /** - * @param identityType - * @return names of supported attributes - * @throws IdentityException - */ - Set getSupportedAttributeNames(T= identityType) - throws IdentityException; + = = /** - * Get attributes for the given identity - * - * @param identity - * @return - * @throws IdentityException - */ - Map getAttributes(IdentityObject identity) throws Ide= ntityException; - - /** - * Update attributes with new values - previous values will be overwrit= ten - * @param identity - * @param attributes - * @throws IdentityException - */ - void updateAttributes(IdentityObject identity, Map at= tributes) - throws IdentityException; - - /** - * Add new attributes - if attribute with given name already exists the= values = - * will be appended - * - * @param identity - * @param attributes - * @throws IdentityException - */ - void addAttributes(IdentityObject identity, Map attri= butes) - throws IdentityException; - - /** - * Remove attributes - * - * @param identity - * @param attributes - */ - void removeAttributes(IdentityObject identity, Set attributes) = - throws IdentityException; - - /** * Create directional relationship of a given type between identities * * @param fromIdentity --===============8641310032451847063==--