Author: bdaw
Date: 2008-09-02 14:26:12 -0400 (Tue, 02 Sep 2008)
New Revision: 54
Removed:
trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java
trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/IdentityManager.java
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/PersistenceManager.java
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleGroup.java
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleIdentity.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityManager.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStore.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStoreRepository.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalPersistenceManager.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRealm.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRelationshipManager.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalSession.java
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/test/portal/PortalIdentityUnitTestCase.java
trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityObject.java
Log:
- Make RelationshipManager be assosiated with one realm. Extract realm-realm relationship
methods to IdentityManager and link both classes.
- Make IdentityManager expose PersistanceManager instead of IdentityStoreRepository as
PersistanceManager resolves mapping realm/repository anyway
- Comment out rest of portal test classes temporarily to have less work during
refactorings
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/IdentityManager.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/IdentityManager.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/IdentityManager.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -24,9 +24,12 @@
import java.io.InputStream;
import org.jboss.identity.api.exception.IdentityException;
+import org.jboss.identity.api.exception.PersistenceManagerNotFoundException;
+import org.jboss.identity.api.exception.SessionNotOpenException;
import org.jboss.identity.api.session.Session;
import org.jboss.identity.api.store.IdentityStoreRepository;
import org.jboss.identity.model.Identity;
+import org.jboss.identity.model.relation.RelationshipType;
import org.jboss.identity.model.roles.Role;
import org.jboss.identity.model.roles.RoleType;
import org.jboss.identity.model.domain.Realm;
@@ -109,8 +112,52 @@
*/
Role createRole(Realm realm, String roleName, RoleType roleType)
throws IdentityException;
-
+
+
/**
+ * <p>Associate a relationship between two realms</p>
+ * @param realmA
+ * @param realmB
+ * @param relationshipType
+ * @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, RelationshipType relationshipType)
+ throws PersistenceManagerNotFoundException, SessionNotOpenException;
+
+ /**
+ * <p>Disassociate a relationship between two realms</p>
+ * @param realmA
+ * @param realmB
+ * @param relationshipType
+ * @throws PersistenceManagerNotFoundException PM not set
+ * @throws SessionNotOpenException session is not open
+ */
+ void disassociate(Realm realmA, Realm realmB, RelationshipType relationshipType)
+ throws PersistenceManagerNotFoundException,SessionNotOpenException;
+
+ /**
+ * @param fromRealm
+ * @param toRealm
+ * @return returns a relationship type between this and given Realm.
+ */
+ RelationshipType getRelationship(Realm fromRealm, Realm toRealm);
+
+ /**
+ * <p>Returns relationship manager for a given realm</p>
+ * @param realm
+ * @return
+ * @throws IdentityException
+ */
+ RelationshipManager getRelationshipManager(Realm realm) throws IdentityException;
+
+ /**
+ * <p>Return the configured PersistenceManager</p>
+ * @return
+ */
+ PersistenceManager getPersistenceManager();
+
+ /**
* Return the IdentityStoreRepository associated with
* a particular realm
* @param realm
@@ -118,11 +165,4 @@
*/
IdentityStoreRepository getRepository(Realm realm);
- /**
- * Set the IdentityStoreRepository for a realm
- * @param realm
- * @param identityStoreRepository
- */
- void setRepository(Realm realm, IdentityStoreRepository identityStoreRepository);
-
}
\ No newline at end of file
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/PersistenceManager.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/PersistenceManager.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/PersistenceManager.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -29,6 +29,7 @@
/**
* Manages the Identity Stores
* @author Anil.Saldhana(a)redhat.com
+ * @author boleslaw dot dawidowicz at redhat anotherdot com
* @since Jul 10, 2008
*/
public interface PersistenceManager
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/managers/RelationshipManager.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -28,13 +28,12 @@
import org.jboss.identity.api.exception.SessionNotOpenException;
import org.jboss.identity.model.Identity;
import org.jboss.identity.model.roles.Role;
-import org.jboss.identity.model.domain.Realm;
import org.jboss.identity.model.groups.Group;
import org.jboss.identity.model.relation.RelationshipType;
/**
* <p>Manages the relationships between
- * roles, groups, identities and realms</p>
+ * roles, groups and identities within a realm</p>
* @author Anil.Saldhana(a)redhat.com
* @author boleslaw dot dawidowicz at redhat anotherdot com
* @since Jul 10, 2008
@@ -63,59 +62,46 @@
void associate(Group groupA, List<Group> groupB, RelationshipType
relationshipType)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
- /**
- * <p>Associate a relationship between two realms</p>
- * @param realmA
- * @param realmB
- * @param relationshipType
- * @throws PersistenceManagerNotFoundException PM not set
- * @throws SessionNotOpenException session is not open
- */
- void associate(Realm realmA, Realm realmB, RelationshipType relationshipType)
- throws PersistenceManagerNotFoundException,SessionNotOpenException;
+
/**
* <p>Associate a role with an Identity</p>
- * @param realm
* @param identity
* @param aRole
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void associate(Realm realm, Identity identity, Role aRole)
+ void associate(Identity identity, Role aRole)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
* <p>Associate a list of roles with an Identity</p>
- * @param realm
* @param identity
* @param aRoleList
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void associate(Realm realm, Identity identity, List<Role> aRoleList)
+ void associate(Identity identity, List<Role> aRoleList)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
* <p>Associate a group with an identity</p>
- * @param realm
* @param identity
* @param aGroup
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void associate(Realm realm,Identity identity, Group aGroup)
+ void associate(Identity identity, Group aGroup)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
* <p>Associate a set of groups with an identity</p>
- * @param realm
* @param identity
* @param aGroupSet
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void associate(Realm realm,Identity identity, Set<Group> aGroupSet)
+ void associate(Identity identity, Set<Group> aGroupSet)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
@@ -140,59 +126,46 @@
void disassociate(Group groupA, List<Group> groupB, RelationshipType
relationshipType)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
- /**
- * <p>Disassociate a relationship between two realms</p>
- * @param realmA
- * @param realmB
- * @param relationshipType
- * @throws PersistenceManagerNotFoundException PM not set
- * @throws SessionNotOpenException session is not open
- */
- void disassociate(Realm realmA, Realm realmB, RelationshipType relationshipType)
- throws PersistenceManagerNotFoundException,SessionNotOpenException;
+
/**
* <p>Disassociate a role with an Identity</p>
- * @param realm
* @param identity
* @param aRole
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void disassociate(Realm realm, Identity identity, Role aRole)
+ void disassociate(Identity identity, Role aRole)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
* <p>Disassociate a list of roles with an Identity</p>
- * @param realm
* @param identity
* @param aRoleList
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void disassociate(Realm realm, Identity identity, List<Role> aRoleList)
+ void disassociate(Identity identity, List<Role> aRoleList)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
* <p>Disassociate a group with an identity</p>
- * @param realm
* @param identity
* @param aGroup
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void disassociate(Realm realm,Identity identity, Group aGroup)
+ void disassociate(Identity identity, Group aGroup)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
* <p>Disassociate a set of groups with an identity</p>
- * @param realm
* @param identity
* @param aGroupSet
* @throws PersistenceManagerNotFoundException PM not set
* @throws SessionNotOpenException session is not open
*/
- void disassociate(Realm realm,Identity identity, Set<Group> aGroupSet)
+ void disassociate(Identity identity, Set<Group> aGroupSet)
throws PersistenceManagerNotFoundException,SessionNotOpenException;
/**
@@ -202,22 +175,7 @@
*/
RelationshipType getRelationship(Group fromGroup, Group toGroup);
- /**
- * @param fromRealm
- * @param toRealm
- * @return returns a relationship type between this and given Realm.
- */
- RelationshipType getRelationship(Realm fromRealm, Realm toRealm);
+
- /**
- * <p>Return the configured PersistenceManager</p>
- * @return
- */
- PersistenceManager getPersistenceManager();
-
- /**
- * <p>Set the PersistenceManager</p>
- * @param persistenceManager
- */
- void setPersistenceManager(PersistenceManager persistenceManager);
+
}
\ No newline at end of file
Modified:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleGroup.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleGroup.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleGroup.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -45,6 +45,16 @@
this.name = name;
}
+ public Object getId()
+ {
+ return null;
+ }
+
+ public String getFQDN()
+ {
+ return null;
+ }
+
public IdentityType getIdentityType()
{
return null;
Modified:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleIdentity.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleIdentity.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/types/SimpleIdentity.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -34,6 +34,8 @@
/**
* Very simple identity
* @author Anil.Saldhana(a)redhat.com
+ * @author boleslaw dot dawidowicz at redhat anotherdot com
+ *
* @since Aug 6, 2008
*/
public class SimpleIdentity implements Identity
@@ -53,7 +55,17 @@
{
this.name = n;
}
-
+
+ public Object getId()
+ {
+ return null;
+ }
+
+ public String getFQDN()
+ {
+ return null;
+ }
+
public List<IdentityAttribute> getAttributes()
{
return Collections.unmodifiableList(attributes);
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityManager.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityManager.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityManager.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -23,86 +23,86 @@
import java.io.InputStream;
-import org.jboss.identity.api.exception.IdentityException;
-import org.jboss.identity.api.managers.IdentityManager;
-import org.jboss.identity.api.session.Session;
-import org.jboss.identity.api.store.IdentityStoreRepository;
-import org.jboss.identity.model.Identity;
-import org.jboss.identity.model.roles.Role;
-import org.jboss.identity.model.roles.RoleType;
-import org.jboss.identity.model.domain.Realm;
-import org.jboss.identity.model.groups.Group;
-import org.jboss.identity.model.groups.GroupType;
+//import org.jboss.identity.api.exception.IdentityException;
+//import org.jboss.identity.api.managers.IdentityManager;
+//import org.jboss.identity.api.session.Session;
+//import org.jboss.identity.api.store.IdentityStoreRepository;
+//import org.jboss.identity.model.Identity;
+//import org.jboss.identity.model.roles.Role;
+//import org.jboss.identity.model.roles.RoleType;
+//import org.jboss.identity.model.domain.Realm;
+//import org.jboss.identity.model.groups.Group;
+//import org.jboss.identity.model.groups.GroupType;
/**
* Implements the Portal Identity Manager
* @author Anil.Saldhana(a)redhat.com
* @since Jul 22, 2008
*/
-public class PortalIdentityManager implements IdentityManager
-{
- private PortalRealm portalRealm = new PortalRealm();
-
- private IdentityStoreRepository repository;
-
- public Realm bootstrap(String realmName)
- {
- return portalRealm;
- }
-
- public Realm bootstrap(String realmName, InputStream config)
- {
- //TODO: handle config
- return portalRealm;
- }
-
- public Group createGroup(Realm realm, String groupName)
- throws IdentityException
- {
-// IdentityStore identityStore =
this.repository.getIdentityStore(IdentityTypeEnum.IDENTITY);
-// if(identityStore == null)
-// throw new IllegalStateException("Identity Store is null");
-// return identityStore.createGroup(groupName);
- return null;
- }
-
- public Group createGroup(Realm realm, String groupName, GroupType groupType)
- throws IdentityException
- {
- return null;
- }
-
- public Identity createIdentity(Realm realm, String identityName) throws
IdentityException
- {
-// IdentityStore identityStore =
this.repository.getIdentityStore(IdentityTypeEnum.IDENTITY);
-// if(identityStore == null)
-// throw new IllegalStateException("Identity Store is null");
-// return identityStore.createIdentity(identityName);
- return null;
- }
-
- public Role createRole(Realm realm, String roleName, RoleType roleType)
- {
- return null;
- }
-
- public Session createSession(String sessionType, String identityName)
- {
- return PortalSession.newSession();
- }
-
- public Realm getRealm(String realmName, boolean shouldBootstrap)
- {
- return portalRealm;
- }
-
- public IdentityStoreRepository getRepository(Realm realm)
- {
- return repository;
- }
-
- public void setRepository(Realm realm, IdentityStoreRepository
identityStoreRepository)
- {
- this.repository = identityStoreRepository;
- }
-}
\ No newline at end of file
+//public class PortalIdentityManager implements IdentityManager
+//{
+// private PortalRealm portalRealm = new PortalRealm();
+//
+// private IdentityStoreRepository repository;
+//
+// public Realm bootstrap(String realmName)
+// {
+// return portalRealm;
+// }
+//
+// public Realm bootstrap(String realmName, InputStream config)
+// {
+// //TODO: handle config
+// return portalRealm;
+// }
+//
+// public Group createGroup(Realm realm, String groupName)
+// throws IdentityException
+// {
+//// IdentityStore identityStore =
this.repository.getIdentityStore(IdentityTypeEnum.IDENTITY);
+//// if(identityStore == null)
+//// throw new IllegalStateException("Identity Store is null");
+//// return identityStore.createGroup(groupName);
+// return null;
+// }
+//
+// public Group createGroup(Realm realm, String groupName, GroupType groupType)
+// throws IdentityException
+// {
+// return null;
+// }
+//
+// public Identity createIdentity(Realm realm, String identityName) throws
IdentityException
+// {
+//// IdentityStore identityStore =
this.repository.getIdentityStore(IdentityTypeEnum.IDENTITY);
+//// if(identityStore == null)
+//// throw new IllegalStateException("Identity Store is null");
+//// return identityStore.createIdentity(identityName);
+// return null;
+// }
+//
+// public Role createRole(Realm realm, String roleName, RoleType roleType)
+// {
+// return null;
+// }
+//
+// public Session createSession(String sessionType, String identityName)
+// {
+// return PortalSession.newSession();
+// }
+//
+// public Realm getRealm(String realmName, boolean shouldBootstrap)
+// {
+// return portalRealm;
+// }
+//
+// public IdentityStoreRepository getRepository(Realm realm)
+// {
+// return repository;
+// }
+//
+// public void setRepository(Realm realm, IdentityStoreRepository
identityStoreRepository)
+// {
+// this.repository = identityStoreRepository;
+// }
+//}
\ No newline at end of file
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStore.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStore.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStore.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -21,19 +21,19 @@
*/
package org.jboss.test.identity.impl.portal;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
+//import java.io.IOException;
+//import java.util.Collection;
+//import java.util.Map;
+//import java.util.Set;
+//
+//import org.jboss.identity.api.exception.IdentityException;
+//import org.jboss.identity.api.store.FeaturesDescription;
+//import org.jboss.identity.api.store.IdentityStore;
+//import org.jboss.identity.model.Identity;
+//import org.jboss.identity.model.IdentityType;
+//import org.jboss.identity.model.groups.Group;
+//import org.jboss.identity.model.relation.RelationshipType;
-import org.jboss.identity.api.exception.IdentityException;
-import org.jboss.identity.api.store.FeaturesDescription;
-import org.jboss.identity.api.store.IdentityStore;
-import org.jboss.identity.model.Identity;
-import org.jboss.identity.model.IdentityType;
-import org.jboss.identity.model.groups.Group;
-import org.jboss.identity.model.relation.RelationshipType;
-
/**
* Portal identity store
* @author Anil.Saldhana(a)redhat.com
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStoreRepository.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStoreRepository.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalIdentityStoreRepository.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -1,63 +1,63 @@
-/*
- * 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.test.identity.impl.portal;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.identity.api.store.IdentityStore;
-import org.jboss.identity.api.store.IdentityStoreRepository;
-import org.jboss.identity.model.IdentityType;
-
-/**
- * IdentityStoreRepository for portal realm
- * @author Anil.Saldhana(a)redhat.com
- * @since Aug 1, 2008
- */
-public class PortalIdentityStoreRepository implements IdentityStoreRepository
-{
- private Map<IdentityType,IdentityStore> storeMap =
- new HashMap<IdentityType, IdentityStore>();
-
- public Set<IdentityStore> getConfiguredIdentityStores()
- {
- return new HashSet<IdentityStore>(this.storeMap.values());
- }
-
- public IdentityStore getIdentityStore(IdentityType identityType)
- {
- return this.storeMap.get(identityType);
- }
-
- public Map<IdentityType, IdentityStore> getIdentityStoreMappings()
- {
- return Collections.unmodifiableMap(storeMap);
- }
-
- public void register(IdentityType identityType, IdentityStore identityStore)
- {
- this.storeMap.put(identityType, identityStore);
- }
-}
\ No newline at end of file
+///*
+// * 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.test.identity.impl.portal;
+//
+//import java.util.Collections;
+//import java.util.HashMap;
+//import java.util.HashSet;
+//import java.util.Map;
+//import java.util.Set;
+//
+//import org.jboss.identity.api.store.IdentityStore;
+//import org.jboss.identity.api.store.IdentityStoreRepository;
+//import org.jboss.identity.model.IdentityType;
+//
+///**
+// * IdentityStoreRepository for portal realm
+// * @author Anil.Saldhana(a)redhat.com
+// * @since Aug 1, 2008
+// */
+//public class PortalIdentityStoreRepository implements IdentityStoreRepository
+//{
+// private Map<IdentityType,IdentityStore> storeMap =
+// new HashMap<IdentityType, IdentityStore>();
+//
+// public Set<IdentityStore> getConfiguredIdentityStores()
+// {
+// return new HashSet<IdentityStore>(this.storeMap.values());
+// }
+//
+// public IdentityStore getIdentityStore(IdentityType identityType)
+// {
+// return this.storeMap.get(identityType);
+// }
+//
+// public Map<IdentityType, IdentityStore> getIdentityStoreMappings()
+// {
+// return Collections.unmodifiableMap(storeMap);
+// }
+//
+// public void register(IdentityType identityType, IdentityStore identityStore)
+// {
+// this.storeMap.put(identityType, identityStore);
+// }
+//}
\ No newline at end of file
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalPersistenceManager.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalPersistenceManager.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalPersistenceManager.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -1,51 +1,51 @@
-/*
- * 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.test.identity.impl.portal;
-
-import org.jboss.identity.api.managers.PersistenceManager;
-import org.jboss.identity.api.store.IdentityStore;
-import org.jboss.identity.api.store.IdentityStoreRepository;
-import org.jboss.identity.model.IdentityType;
-import org.jboss.identity.model.domain.Realm;
-
-/**
- * Portal Persistence Manager
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 22, 2008
- */
-public class PortalPersistenceManager implements PersistenceManager
-{
- public IdentityStoreRepository getIdentityStoreRepository(Realm realm)
- {
- return null;
- }
-
- public IdentityStore getIdentityStore(Realm realm, IdentityType identityType)
- {
- return null;
- }
-
- public IdentityStoreRepository getIdentityStoreRepository()
- {
- return null;
- }
-}
\ No newline at end of file
+///*
+// * 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.test.identity.impl.portal;
+//
+//import org.jboss.identity.api.managers.PersistenceManager;
+//import org.jboss.identity.api.store.IdentityStore;
+//import org.jboss.identity.api.store.IdentityStoreRepository;
+//import org.jboss.identity.model.IdentityType;
+//import org.jboss.identity.model.domain.Realm;
+//
+///**
+// * Portal Persistence Manager
+// * @author Anil.Saldhana(a)redhat.com
+// * @since Jul 22, 2008
+// */
+//public class PortalPersistenceManager implements PersistenceManager
+//{
+// public IdentityStoreRepository getIdentityStoreRepository(Realm realm)
+// {
+// return null;
+// }
+//
+// public IdentityStore getIdentityStore(Realm realm, IdentityType identityType)
+// {
+// return null;
+// }
+//
+// public IdentityStoreRepository getIdentityStoreRepository()
+// {
+// return null;
+// }
+//}
\ No newline at end of file
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRealm.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRealm.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRealm.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -1,58 +1,58 @@
-/*
- * 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.test.identity.impl.portal;
-
-import org.jboss.identity.model.domain.ModelRoot;
-import org.jboss.identity.model.domain.Realm;
-import org.jboss.identity.model.domain.SimpleModelRoot;
-
-/**
- * Represents a Portal Realm
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 22, 2008
- */
-public class PortalRealm implements Realm
-{
- private ModelRoot identityModelRoot, groupModelRoot, relationshipModelRoot;
-
- public void createModelRoots()
- {
- identityModelRoot = new SimpleModelRoot("Identity");
- groupModelRoot = new SimpleModelRoot("Group");
- relationshipModelRoot = new SimpleModelRoot("Relationship");
- }
-
- public ModelRoot getGroupModelRoot()
- {
- return this.groupModelRoot;
- }
-
- public ModelRoot getIdentityModelRoot()
- {
- return this.identityModelRoot;
- }
-
- public ModelRoot getRelationshipModelRoot()
- {
- return this.relationshipModelRoot;
- }
-}
\ No newline at end of file
+///*
+// * 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.test.identity.impl.portal;
+//
+//import org.jboss.identity.model.domain.ModelRoot;
+//import org.jboss.identity.model.domain.Realm;
+//import org.jboss.identity.model.domain.SimpleModelRoot;
+//
+///**
+// * Represents a Portal Realm
+// * @author Anil.Saldhana(a)redhat.com
+// * @since Jul 22, 2008
+// */
+//public class PortalRealm implements Realm
+//{
+// private ModelRoot identityModelRoot, groupModelRoot, relationshipModelRoot;
+//
+// public void createModelRoots()
+// {
+// identityModelRoot = new SimpleModelRoot("Identity");
+// groupModelRoot = new SimpleModelRoot("Group");
+// relationshipModelRoot = new SimpleModelRoot("Relationship");
+// }
+//
+// public ModelRoot getGroupModelRoot()
+// {
+// return this.groupModelRoot;
+// }
+//
+// public ModelRoot getIdentityModelRoot()
+// {
+// return this.identityModelRoot;
+// }
+//
+// public ModelRoot getRelationshipModelRoot()
+// {
+// return this.relationshipModelRoot;
+// }
+//}
\ No newline at end of file
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRelationshipManager.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRelationshipManager.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalRelationshipManager.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -21,112 +21,112 @@
*/
package org.jboss.test.identity.impl.portal;
-import java.util.List;
-import java.util.Set;
+//import java.util.List;
+//import java.util.Set;
+//
+//import org.jboss.identity.api.exception.PersistenceManagerNotFoundException;
+//import org.jboss.identity.api.exception.SessionNotOpenException;
+//import org.jboss.identity.api.managers.PersistenceManager;
+//import org.jboss.identity.api.managers.RelationshipManager;
+//import org.jboss.identity.model.Identity;
+//import org.jboss.identity.model.roles.Role;
+//import org.jboss.identity.model.domain.Realm;
+//import org.jboss.identity.model.groups.Group;
+//import org.jboss.identity.model.relation.RelationshipType;
-import org.jboss.identity.api.exception.PersistenceManagerNotFoundException;
-import org.jboss.identity.api.exception.SessionNotOpenException;
-import org.jboss.identity.api.managers.PersistenceManager;
-import org.jboss.identity.api.managers.RelationshipManager;
-import org.jboss.identity.model.Identity;
-import org.jboss.identity.model.roles.Role;
-import org.jboss.identity.model.domain.Realm;
-import org.jboss.identity.model.groups.Group;
-import org.jboss.identity.model.relation.RelationshipType;
-
/**
* @author Anil.Saldhana(a)redhat.com
* @since Jul 22, 2008
*/
-public class PortalRelationshipManager implements RelationshipManager
-{
- public void associate(Group groupA, Group groupB, RelationshipType relationshipType)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
-
- public void associate(Group groupA, List<Group> groupB, RelationshipType
relationshipType)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void associate(Realm realmA, Realm realmB, RelationshipType relationshipType)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void associate(Realm realm, Identity identity, Role role) throws
PersistenceManagerNotFoundException,
- SessionNotOpenException
- {
- }
-
- public void associate(Realm realm, Identity identity, List<Role> roleList)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void associate(Realm realm, Identity identity, Group group) throws
PersistenceManagerNotFoundException,
- SessionNotOpenException
- {
- }
-
- public void associate(Realm realm, Identity identity, Set<Group> groupSet)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void disassociate(Group groupA, Group groupB, RelationshipType
relationshipType)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void disassociate(Group groupA, List<Group> groupB, RelationshipType
relationshipType)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void disassociate(Realm realmA, Realm realmB, RelationshipType
relationshipType)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void disassociate(Realm realm, Identity identity, Role role) throws
PersistenceManagerNotFoundException,
- SessionNotOpenException
- {
- }
-
- public void disassociate(Realm realm, Identity identity, List<Role> roleList)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public void disassociate(Realm realm, Identity identity, Group group) throws
PersistenceManagerNotFoundException,
- SessionNotOpenException
- {
- }
-
- public void disassociate(Realm realm, Identity identity, Set<Group> groupSet)
- throws PersistenceManagerNotFoundException, SessionNotOpenException
- {
- }
-
- public PersistenceManager getPersistenceManager()
- {
- return null;
- }
-
- public RelationshipType getRelationship(Group fromGroup, Group toGroup)
- {
- return null;
- }
-
- public RelationshipType getRelationship(Realm fromRealm, Realm toRealm)
- {
- return null;
- }
-
- public void setPersistenceManager(PersistenceManager persistenceManager)
- {
- }
-}
\ No newline at end of file
+//public class PortalRelationshipManager implements RelationshipManager
+//{
+// public void associate(Group groupA, Group groupB, RelationshipType
relationshipType)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+//
+// public void associate(Group groupA, List<Group> groupB, RelationshipType
relationshipType)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void associate(Realm realmA, Realm realmB, RelationshipType
relationshipType)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void associate(Realm realm, Identity identity, Role role) throws
PersistenceManagerNotFoundException,
+// SessionNotOpenException
+// {
+// }
+//
+// public void associate(Realm realm, Identity identity, List<Role> roleList)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void associate(Realm realm, Identity identity, Group group) throws
PersistenceManagerNotFoundException,
+// SessionNotOpenException
+// {
+// }
+//
+// public void associate(Realm realm, Identity identity, Set<Group> groupSet)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void disassociate(Group groupA, Group groupB, RelationshipType
relationshipType)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void disassociate(Group groupA, List<Group> groupB, RelationshipType
relationshipType)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void disassociate(Realm realmA, Realm realmB, RelationshipType
relationshipType)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void disassociate(Realm realm, Identity identity, Role role) throws
PersistenceManagerNotFoundException,
+// SessionNotOpenException
+// {
+// }
+//
+// public void disassociate(Realm realm, Identity identity, List<Role> roleList)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public void disassociate(Realm realm, Identity identity, Group group) throws
PersistenceManagerNotFoundException,
+// SessionNotOpenException
+// {
+// }
+//
+// public void disassociate(Realm realm, Identity identity, Set<Group> groupSet)
+// throws PersistenceManagerNotFoundException, SessionNotOpenException
+// {
+// }
+//
+// public PersistenceManager getPersistenceManager()
+// {
+// return null;
+// }
+//
+// public RelationshipType getRelationship(Group fromGroup, Group toGroup)
+// {
+// return null;
+// }
+//
+// public RelationshipType getRelationship(Realm fromRealm, Realm toRealm)
+// {
+// return null;
+// }
+//
+// public void setPersistenceManager(PersistenceManager persistenceManager)
+// {
+// }
+//}
\ No newline at end of file
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalSession.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalSession.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/portal/PortalSession.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -1,90 +1,90 @@
-/*
- * 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.test.identity.impl.portal;
-
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.jboss.identity.api.exception.IdentityException;
-import org.jboss.identity.api.session.Session;
-import org.jboss.identity.api.session.SessionState;
-
-/**
- * Portal Session
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 22, 2008
- */
-public class PortalSession implements Session
-{
- private static ConcurrentHashMap<String,PortalSession>
- portalSessions = new ConcurrentHashMap<String,PortalSession>();
-
- private String id = UUID.randomUUID().toString();
-
- private SessionState state;
-
- private PortalSession()
- {
- }
-
- public String getId()
- {
- return id;
- }
-
- public void clear() throws IdentityException
- {
- }
-
- public void close() throws IdentityException
- {
- state = SessionState.CLOSED;
- }
-
- public boolean isOpen()
- {
- return state != SessionState.CLOSED;
- }
-
- public void open() throws IdentityException
- {
- if(!isOpen())
- state = SessionState.OPEN;
- }
-
- public void save() throws IdentityException
- {
- }
-
- public static PortalSession getSession(String id)
- {
- //TODO: handle security better
- return portalSessions.get(id);
- }
-
- public static PortalSession newSession()
- {
- PortalSession newPortalSession = new PortalSession();
- portalSessions.put(newPortalSession.id, newPortalSession);
- return newPortalSession;
- }
-}
\ No newline at end of file
+///*
+// * 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.test.identity.impl.portal;
+//
+//import java.util.UUID;
+//import java.util.concurrent.ConcurrentHashMap;
+//
+//import org.jboss.identity.api.exception.IdentityException;
+//import org.jboss.identity.api.session.Session;
+//import org.jboss.identity.api.session.SessionState;
+//
+///**
+// * Portal Session
+// * @author Anil.Saldhana(a)redhat.com
+// * @since Jul 22, 2008
+// */
+//public class PortalSession implements Session
+//{
+// private static ConcurrentHashMap<String,PortalSession>
+// portalSessions = new ConcurrentHashMap<String,PortalSession>();
+//
+// private String id = UUID.randomUUID().toString();
+//
+// private SessionState state;
+//
+// private PortalSession()
+// {
+// }
+//
+// public String getId()
+// {
+// return id;
+// }
+//
+// public void clear() throws IdentityException
+// {
+// }
+//
+// public void close() throws IdentityException
+// {
+// state = SessionState.CLOSED;
+// }
+//
+// public boolean isOpen()
+// {
+// return state != SessionState.CLOSED;
+// }
+//
+// public void open() throws IdentityException
+// {
+// if(!isOpen())
+// state = SessionState.OPEN;
+// }
+//
+// public void save() throws IdentityException
+// {
+// }
+//
+// public static PortalSession getSession(String id)
+// {
+// //TODO: handle security better
+// return portalSessions.get(id);
+// }
+//
+// public static PortalSession newSession()
+// {
+// PortalSession newPortalSession = new PortalSession();
+// portalSessions.put(newPortalSession.id, newPortalSession);
+// return newPortalSession;
+// }
+//}
\ No newline at end of file
Modified:
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/test/portal/PortalIdentityUnitTestCase.java
===================================================================
---
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/test/portal/PortalIdentityUnitTestCase.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-impl/src/test/java/org/jboss/test/identity/impl/test/portal/PortalIdentityUnitTestCase.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -23,22 +23,22 @@
import junit.framework.TestCase;
-import org.jboss.identity.api.managers.IdentityManager;
-import org.jboss.identity.api.managers.RelationshipManager;
-import org.jboss.identity.api.store.IdentityStore;
-import org.jboss.identity.api.store.IdentityStoreRepository;
-import org.jboss.identity.impl.store.FileBasedIdentityStore;
-import org.jboss.identity.model.Identity;
-import org.jboss.identity.model.IdentityType;
-import org.jboss.identity.model.groups.Group;
-import org.jboss.identity.model.groups.GroupType;
-import org.jboss.identity.model.groups.SimpleGroupType;
-import org.jboss.identity.model.relation.HierarchicalRelationshipType;
-import org.jboss.identity.model.relation.RelationshipType;
-import org.jboss.test.identity.impl.portal.PortalIdentityManager;
-import org.jboss.test.identity.impl.portal.PortalIdentityStoreRepository;
-import org.jboss.test.identity.impl.portal.PortalRealm;
-import org.jboss.test.identity.impl.portal.PortalRelationshipManager;
+//import org.jboss.identity.api.managers.IdentityManager;
+//import org.jboss.identity.api.managers.RelationshipManager;
+//import org.jboss.identity.api.store.IdentityStore;
+//import org.jboss.identity.api.store.IdentityStoreRepository;
+//import org.jboss.identity.impl.store.FileBasedIdentityStore;
+//import org.jboss.identity.model.Identity;
+//import org.jboss.identity.model.IdentityType;
+//import org.jboss.identity.model.groups.Group;
+//import org.jboss.identity.model.groups.GroupType;
+//import org.jboss.identity.model.groups.SimpleGroupType;
+//import org.jboss.identity.model.relation.HierarchicalRelationshipType;
+//import org.jboss.identity.model.relation.RelationshipType;
+////import org.jboss.test.identity.impl.portal.PortalIdentityManager;
+//import org.jboss.test.identity.impl.portal.PortalIdentityStoreRepository;
+//import org.jboss.test.identity.impl.portal.PortalRealm;
+//import org.jboss.test.identity.impl.portal.PortalRelationshipManager;
/**
* Portal identity unit test
@@ -50,23 +50,23 @@
// private IdentityType IDENTITY = IdentityTypeEnum.IDENTITY;
// private IdentityType GROUP = IdentityTypeEnum.GROUP;
- private RelationshipType hierarchy = new HierarchicalRelationshipType();
- private RelationshipManager relationshipManager = new PortalRelationshipManager();
- private IdentityManager identityManager = new PortalIdentityManager();
- private PortalRealm portalRealm ;
- private PortalIdentityStoreRepository portalRepository;
- private IdentityStore portalIdentityStore;
+// private RelationshipType hierarchy = new HierarchicalRelationshipType();
+// private RelationshipManager relationshipManager = new PortalRelationshipManager();
+// private IdentityManager identityManager = new PortalIdentityManager();
+// private PortalRealm portalRealm ;
+// private PortalIdentityStoreRepository portalRepository;
+// private IdentityStore portalIdentityStore;
+//
+// protected void setUp() throws Exception
+// {
+// portalRealm = (PortalRealm) identityManager.bootstrap("portal");
+// portalRealm.createModelRoots();
+// portalRepository = new PortalIdentityStoreRepository();
+// identityManager.setRepository(portalRealm, portalRepository);
+// portalIdentityStore = new FileBasedIdentityStore();
+//// portalRepository.register(IDENTITY, portalIdentityStore);
+// }
- protected void setUp() throws Exception
- {
- portalRealm = (PortalRealm) identityManager.bootstrap("portal");
- portalRealm.createModelRoots();
- portalRepository = new PortalIdentityStoreRepository();
- identityManager.setRepository(portalRealm, portalRepository);
- portalIdentityStore = new FileBasedIdentityStore();
-// portalRepository.register(IDENTITY, portalIdentityStore);
- }
-
public void testPortalIdentityOrganizationType() throws Exception
{
bootstrapOrganizationType();
Modified: trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityObject.java
===================================================================
---
trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityObject.java 2008-09-02
17:53:24 UTC (rev 53)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityObject.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -35,12 +35,23 @@
{
/**
+ * @return id of this identity object
+ */
+ Object getId();
+
+ /**
+ * FQDN identifies the context of this object - realm, identity store in which it is
persisted and object id in this store
+ *
+ * @return full qualified domain name for this identity
+ */
+ String getFQDN();
+
+ /**
* <p>Return the name of the identity</p>
* @return
*/
String getName();
-
/**
* <p>Return type of this identity object</p>
* @return
Deleted: trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java 2008-09-02
17:53:24 UTC (rev 53)
+++ trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -1,36 +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.model;
-
-/**
- * Marker Interface represents a role
- * @author Anil.Saldhana(a)redhat.com
- * @since Jun 30, 2008
- */
-public interface Role extends IdentityType
-{
- /**
- * Get the type of role
- * @return
- */
- RoleType getRoleType();
-}
\ No newline at end of file
Deleted: trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java 2008-09-02
17:53:24 UTC (rev 53)
+++ trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java 2008-09-02
18:26:12 UTC (rev 54)
@@ -1,48 +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.model;
-
-/**
- * Type of Role
- * @author Anil.Saldhana(a)redhat.com
- * @since Jun 30, 2008
- */
-public enum RoleType
-{
- /**
- * Plain Role
- */
- REGULAR,
- /**
- * A role that is nested within another
- */
- NESTED,
- /**
- * A role that is part of an hierarchy
- * (Eg. LDAP Role)
- */
- HIERARCHICAL,
- /**
- * Custom Role
- */
- CUSTOM;
-}
\ No newline at end of file