Author: bdaw
Date: 2008-06-11 11:08:22 -0400 (Wed, 11 Jun 2008)
New Revision: 10986
Added:
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupEntity.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupIdentityStore.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/Relationship.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/UserEntity.java
Removed:
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java
Log:
move simple model
Modified:
modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java
===================================================================
---
modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java 2008-06-11
13:36:54 UTC (rev 10985)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java 2008-06-11
15:08:22 UTC (rev 10986)
@@ -37,7 +37,7 @@
*/
public enum GenericEntityType implements IdentityType
{
- IDENTITY,
+ USER,
ROLE,
@@ -56,7 +56,7 @@
// ROLE
// can nest other users
- roleRelationships.put(GenericEntityType.IDENTITY, nested);
+ roleRelationships.put(GenericEntityType.USER, nested);
// ROLE_GROUP
@@ -123,7 +123,7 @@
return Collections.unmodifiableMap(roleGroupRelationships);
}
- // IDENTITY or anything else
+ // USER or anything else
return Collections.emptyMap();
Copied: modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupEntity.java
(from rev 10984,
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupEntity.java)
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupEntity.java
(rev 0)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupEntity.java 2008-06-11
15:08:22 UTC (rev 10986)
@@ -0,0 +1,52 @@
+/*
+* 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.idm.model;
+
+import org.jboss.idm.IdentityType;
+
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface GroupEntity
+{
+ Object getId();
+
+ String getName();
+
+ IdentityType getType();
+
+ Map<String, String[]> getAttributes();
+
+ Object getParentId();
+
+ Collection<Relationship> getFromRelations();
+
+ Collection<Relationship> getToRelations();
+
+ Collection<UserEntity> getUserEntities();
+
+}
Copied:
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupIdentityStore.java (from
rev 10984,
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupIdentityStore.java)
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupIdentityStore.java
(rev 0)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/GroupIdentityStore.java 2008-06-11
15:08:22 UTC (rev 10986)
@@ -0,0 +1,46 @@
+/*
+* 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.idm.model;
+
+import org.jboss.idm.IdentityStore;
+import org.jboss.idm.IdentityType;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface GroupIdentityStore extends IdentityStore
+{
+
+ boolean isUserStore();
+
+ boolean supportExternalGroupRelationships();
+
+
+ // TODO: Set of needed methods
+
+ // TODO: Mechanism for extensions and dynamic discovery of supported extended
operations
+
+}
Copied: modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/Relationship.java
(from rev 10984,
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/Relationship.java)
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/Relationship.java
(rev 0)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/Relationship.java 2008-06-11
15:08:22 UTC (rev 10986)
@@ -0,0 +1,39 @@
+/*
+* 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.idm.model;
+
+import org.jboss.idm.RelationshipType;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface Relationship
+{
+ GroupEntity getFrom();
+
+ GroupEntity getTo();
+
+ RelationshipType getType();
+
+}
Copied: modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/UserEntity.java (from
rev 10984,
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/UserEntity.java)
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/UserEntity.java
(rev 0)
+++
modules/identity/trunk/idm/src/main/java/org/jboss/idm/model/UserEntity.java 2008-06-11
15:08:22 UTC (rev 10986)
@@ -0,0 +1,43 @@
+/*
+* 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.idm.model;
+
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface UserEntity
+{
+
+ Object getId();
+
+ String getUserName();
+
+ Map<String, String[]> getAttributes();
+
+ Collection<GroupEntity> getGroupEntities();
+
+}
\ No newline at end of file