Author: bdaw
Date: 2008-06-18 11:02:37 -0400 (Wed, 18 Jun 2008)
New Revision: 11081
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Session.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java
Log:
Remove references to the idm from portal api
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java
===================================================================
---
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java 2008-06-18
13:57:20 UTC (rev 11080)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java 2008-06-18
15:02:37 UTC (rev 11081)
@@ -22,9 +22,6 @@
package org.jboss.portal.identity.api;
-import org.jboss.idm.IdentityType;
-import org.jboss.idm.RelationshipType;
-
import java.util.Set;
import java.util.Map;
import java.util.HashMap;
@@ -35,7 +32,7 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public enum EntityType implements IdentityType
+public enum EntityType
{
// User
USER,
@@ -55,23 +52,23 @@
// Community of users
COMMUNITY;
- private final static Map<IdentityType, Set<RelationshipType>>
administrationRelationships = new HashMap<IdentityType,
Set<RelationshipType>>();
- private final static Map<IdentityType, Set<RelationshipType>>
organizationRelationships = new HashMap<IdentityType,
Set<RelationshipType>>();
- private final static Map<IdentityType, Set<RelationshipType>>
businessRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
- private final static Map<IdentityType, Set<RelationshipType>>
jeeRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
- private final static Map<IdentityType, Set<RelationshipType>>
communityRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+ private final static Map<EntityType, Set<GroupRelationshipType>>
administrationRelationships = new HashMap<EntityType,
Set<GroupRelationshipType>>();
+ private final static Map<EntityType, Set<GroupRelationshipType>>
organizationRelationships = new HashMap<EntityType,
Set<GroupRelationshipType>>();
+ private final static Map<EntityType, Set<GroupRelationshipType>>
businessRelationships = new HashMap<EntityType,
Set<GroupRelationshipType>>();
+ private final static Map<EntityType, Set<GroupRelationshipType>>
jeeRelationships = new HashMap<EntityType, Set<GroupRelationshipType>>();
+ private final static Map<EntityType, Set<GroupRelationshipType>>
communityRelationships = new HashMap<EntityType,
Set<GroupRelationshipType>>();
static
{
- Set<RelationshipType> all = new HashSet<RelationshipType>();
+ Set<GroupRelationshipType> all = new HashSet<GroupRelationshipType>();
all.add(GroupRelationshipType.HIERARCHICAL);
all.add(GroupRelationshipType.IMPLY);
- Set<RelationshipType> imply = new HashSet<RelationshipType>();
+ Set<GroupRelationshipType> imply = new
HashSet<GroupRelationshipType>();
imply.add(GroupRelationshipType.IMPLY);
- Set<RelationshipType> hierarchical = new HashSet<RelationshipType>();
+ Set<GroupRelationshipType> hierarchical = new
HashSet<GroupRelationshipType>();
hierarchical.add(GroupRelationshipType.HIERARCHICAL);
// USER
@@ -148,9 +145,9 @@
return this.name();
}
- public boolean isRelationshipSupported(IdentityType identityType, RelationshipType
relationshipType)
+ public boolean isRelationshipSupported(EntityType identityType, GroupRelationshipType
relationshipType)
{
- Set<RelationshipType> relTypes = getRelationships().get(identityType);
+ Set<GroupRelationshipType> relTypes = getRelationships().get(identityType);
if (relTypes != null && relTypes.contains(relationshipType))
{
@@ -160,17 +157,17 @@
return false;
}
- public Set<IdentityType> getSupportedIdentities(RelationshipType
relationshipType)
+ public Set<EntityType> getSupportedIdentities(GroupRelationshipType
relationshipType)
{
return getRelationships().keySet();
}
- public Set<IdentityType> getSupportedIdentities()
+ public Set<EntityType> getSupportedIdentities()
{
return getRelationships().keySet();
}
- public Set<RelationshipType> getSupportedRelationships(IdentityType
identityType)
+ public Set<GroupRelationshipType> getSupportedRelationships(EntityType
identityType)
{
Set types = getRelationships().get(identityType);
@@ -184,7 +181,7 @@
}
- private Map<IdentityType, Set<RelationshipType>> getRelationships()
+ private Map<EntityType, Set<GroupRelationshipType>> getRelationships()
{
if (this.getName().equals(ADMINISTRATION.getName()))
{
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java
===================================================================
---
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java 2008-06-18
13:57:20 UTC (rev 11080)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java 2008-06-18
15:02:37 UTC (rev 11081)
@@ -22,8 +22,6 @@
package org.jboss.portal.identity.api;
-import org.jboss.idm.Identity;
-
import java.util.Map;
import java.util.Set;
@@ -32,12 +30,33 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public interface Group extends Identity
+public interface Group
{
+ /**
+ * @return id of this identity
+ */
+ Object getId();
+
+ /**
+ * FQDN identifies the context of this object
+ *
+ * @return full qualified domain name for this identity
+ */
+ String getFQDN();
+
+ /**
+ * @return type of this identity
+ */
EntityType getType();
/**
+ * @return name of this identity
+ */
+ String getName();
+
+
+ /**
* @return group display name
*/
String getDisplayName();
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java
===================================================================
---
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java 2008-06-18
13:57:20 UTC (rev 11080)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java 2008-06-18
15:02:37 UTC (rev 11081)
@@ -26,13 +26,9 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public enum GroupRelationshipType implements org.jboss.idm.RelationshipType
+public enum GroupRelationshipType
{
HIERARCHICAL,
IMPLY;
- public String getName()
- {
- return this.name();
- }
}
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java
===================================================================
---
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java 2008-06-18
13:57:20 UTC (rev 11080)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java 2008-06-18
15:02:37 UTC (rev 11081)
@@ -22,18 +22,9 @@
package org.jboss.portal.identity.api;
-import org.jboss.idm.exceptions.IdentityTypeNotSupportedException;
-
-import java.util.Set;
-import java.util.Map;
-import java.util.Collection;
-import org.jboss.idm.exceptions.IdmException;
-import org.jboss.idm.exceptions.IdentityTypeNotSupportedException
-
/**
- * IdentityModule exposes operations to creat/destroy/find users and roles. Methods to
manipulate those objects and
- * their relationships are exposed directly in Group and User classes.
- *
+ * IdentityModule
+ *
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Session.java
===================================================================
---
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Session.java 2008-06-18
13:57:20 UTC (rev 11080)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Session.java 2008-06-18
15:02:37 UTC (rev 11081)
@@ -22,7 +22,7 @@
package org.jboss.portal.identity.api;
-import org.jboss.idm.exceptions.IdmException;
+import org.jboss.portal.identity.IdentityException;
import java.util.Collection;
import java.util.Map;
@@ -37,17 +37,17 @@
/**
* Close this session
*/
- void close() throws IdmException;
+ void close() throws IdentityException;
/**
* Save all pending changes
*/
- void save() throws IdmException;
+ void save() throws IdentityException;
/**
* Clear this session
*/
- void clear() throws IdmException;
+ void clear() throws IdentityException;
/**
* Check if this session is open
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java
===================================================================
---
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java 2008-06-18
13:57:20 UTC (rev 11080)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java 2008-06-18
15:02:37 UTC (rev 11081)
@@ -31,10 +31,27 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version : 0.1 $
*/
-public interface User extends Identity
+public interface User //extends Identity
{
/**
+ * @return id of this identity
+ */
+ Object getId();
+
+ /**
+ * FQDN identifies the context of this object
+ *
+ * @return full qualified domain name for this identity
+ */
+ String getFQDN();
+
+ /**
+ * @return name of this identity
+ */
+ String getName();
+
+ /**
* @return user email
*/
String getEmail();