Author: bdaw
Date: 2008-09-05 06:09:37 -0400 (Fri, 05 Sep 2008)
New Revision: 64
Added:
trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityTypeEnum.java
trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleTypeEnum.java
Modified:
trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java
trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleType.java
Log:
- RoleType extends IdentityObjectType
- IdentityTypeEnum
Modified: trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java
===================================================================
---
trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java 2008-09-05
08:52:51 UTC (rev 63)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java 2008-09-05
10:09:37 UTC (rev 64)
@@ -27,6 +27,7 @@
import org.jboss.identity.model.Identity;
import org.jboss.identity.model.IdentityObject;
import org.jboss.identity.model.IdentityObjectType;
+import org.jboss.identity.model.IdentityType;
import org.jboss.identity.model.relation.RelationshipType;
import org.jboss.identity.model.roles.Role;
import org.jboss.identity.model.roles.RoleType;
@@ -96,9 +97,10 @@
/**
* <p>Create an identity in the realm</p>
* @param identityName
+ * @param identityType
* @return
*/
- Identity createIdentity(String identityName) throws IdentityException;
+ Identity createIdentity(String identityName, IdentityType identityType) throws
IdentityException;
/**
* Create a group of a particular type
Added: trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityTypeEnum.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityTypeEnum.java
(rev 0)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityTypeEnum.java 2008-09-05
10:09:37 UTC (rev 64)
@@ -0,0 +1,49 @@
+/*
+* 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.model;
+
+import org.jboss.identity.model.policy.RelationshipPolicy;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public enum IdentityTypeEnum implements IdentityType
+{
+ IDENTITY_USER;
+
+ public String getName()
+ {
+ return this.name();
+ }
+
+ public List<RelationshipPolicy<IdentityObjectType, IdentityObjectType>>
getRelationshipPolicies()
+ {
+ return null;
+ }
+
+
+}
Modified: trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleType.java
===================================================================
---
trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleType.java 2008-09-05
08:52:51 UTC (rev 63)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleType.java 2008-09-05
10:09:37 UTC (rev 64)
@@ -32,37 +32,9 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @since Jun 30, 2008
*/
-public enum RoleType implements IdentityObjectType
+public interface RoleType extends IdentityObjectType
{
- /**
- * Plain Role
- */
- ROLE_REGULAR,
- /**
- * A role that is nested within another
- */
- ROLE_NESTED,
- /**
- * A role that is part of an hierarchy
- * (Eg. LDAP Role)
- */
- ROLE_HIERARCHICAL,
- /**
- * Custom Role
- */
- ROLE_CUSTOM;
-
- public String getName()
- {
- return this.name();
- }
- public List<RelationshipPolicy<IdentityObjectType, IdentityObjectType>>
getRelationshipPolicies()
- {
- return null;
- }
-
-
}
\ No newline at end of file
Added:
trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleTypeEnum.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleTypeEnum.java
(rev 0)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/roles/RoleTypeEnum.java 2008-09-05
10:09:37 UTC (rev 64)
@@ -0,0 +1,67 @@
+/*
+* 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.model.roles;
+
+import org.jboss.identity.model.IdentityObjectType;
+import org.jboss.identity.model.policy.RelationshipPolicy;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @author Anil.Saldhana(a)redhat.com
+ * @version : 0.1 $
+ */
+public enum RoleTypeEnum implements RoleType
+{
+ /**
+ * Plain Role
+ */
+ ROLE_REGULAR,
+ /**
+ * A role that is nested within another
+ */
+ ROLE_NESTED,
+ /**
+ * A role that is part of an hierarchy
+ * (Eg. LDAP Role)
+ */
+ ROLE_HIERARCHICAL,
+ /**
+ * Custom Role
+ */
+ ROLE_CUSTOM;
+
+
+ public String getName()
+ {
+ return this.name();
+ }
+
+ public List<RelationshipPolicy<IdentityObjectType, IdentityObjectType>>
getRelationshipPolicies()
+ {
+ return null;
+ }
+
+}