Author: anil.saldhana(a)jboss.com
Date: 2008-07-09 17:15:16 -0400 (Wed, 09 Jul 2008)
New Revision: 10
Added:
trunk/identity-model/src/main/java/org/jboss/identity/model/Identity.java
trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityAttribute.java
trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java
trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java
trunk/identity-model/src/main/java/org/jboss/identity/model/domain/
trunk/identity-model/src/main/java/org/jboss/identity/model/domain/IdentityDomain.java
trunk/identity-model/src/main/java/org/jboss/identity/model/groups/
trunk/identity-model/src/main/java/org/jboss/identity/model/groups/Group.java
trunk/identity-model/src/main/java/org/jboss/identity/model/relation/
trunk/identity-model/src/main/java/org/jboss/identity/model/relation/RelationshipType.java
Log:
JBID-4: identity model
Added: trunk/identity-model/src/main/java/org/jboss/identity/model/Identity.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/Identity.java
(rev 0)
+++ trunk/identity-model/src/main/java/org/jboss/identity/model/Identity.java 2008-07-09
21:15:16 UTC (rev 10)
@@ -0,0 +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.identity.model;
+
+import java.util.List;
+
+import org.jboss.identity.model.groups.Group;
+
+/**
+ * Represents an Identity
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 30, 2008
+ */
+public interface Identity
+{
+ /**
+ * <p>Return the name of the identity</p>
+ * @return
+ */
+ String getName();
+
+ /**
+ * <p>Return a list of attributes</p>
+ * @return
+ */
+ List<IdentityAttribute> getAttributes();
+
+ /**
+ * <p>Return a list of Roles</p>
+ * @return
+ */
+ List<Role> getRoles();
+
+ /**
+ * <p>Return a list of groups</p>
+ * @return
+ */
+ List<Group> getGroups();
+}
\ No newline at end of file
Added: trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityAttribute.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityAttribute.java
(rev 0)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/IdentityAttribute.java 2008-07-09
21:15:16 UTC (rev 10)
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+/**
+ * An attribute of an identity
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jun 30, 2008
+ */
+public interface IdentityAttribute
+{
+}
\ No newline at end of file
Added: trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java
(rev 0)
+++ trunk/identity-model/src/main/java/org/jboss/identity/model/Role.java 2008-07-09
21:15:16 UTC (rev 10)
@@ -0,0 +1,32 @@
+/*
+ * 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
+{
+ RoleType getRoleType();
+}
\ No newline at end of file
Added: trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java
(rev 0)
+++ trunk/identity-model/src/main/java/org/jboss/identity/model/RoleType.java 2008-07-09
21:15:16 UTC (rev 10)
@@ -0,0 +1,48 @@
+/*
+ * 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
Added:
trunk/identity-model/src/main/java/org/jboss/identity/model/domain/IdentityDomain.java
===================================================================
---
trunk/identity-model/src/main/java/org/jboss/identity/model/domain/IdentityDomain.java
(rev 0)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/domain/IdentityDomain.java 2008-07-09
21:15:16 UTC (rev 10)
@@ -0,0 +1,32 @@
+/*
+ * 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.domain;
+
+/**
+ * <p>The <b>realm</b> under which the various models and policies
+ * are applicable.</p>
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jul 9, 2008
+ */
+public interface IdentityDomain
+{
+}
Added: trunk/identity-model/src/main/java/org/jboss/identity/model/groups/Group.java
===================================================================
--- trunk/identity-model/src/main/java/org/jboss/identity/model/groups/Group.java
(rev 0)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/groups/Group.java 2008-07-09
21:15:16 UTC (rev 10)
@@ -0,0 +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.identity.model.groups;
+
+import java.util.List;
+
+import org.jboss.identity.model.Role;
+
+/**
+ * Represents a Group
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jul 9, 2008
+ */
+public interface Group
+{
+ /**
+ * <p>Get the name</p>
+ * @return
+ */
+ String getName();
+
+ /**
+ * <p>Get the list of roles</p>
+ * @return
+ */
+ List<Role> getRoles();
+
+ /**
+ * <p>Get the parent group in hierarchy.</p>
+ * <p> May be <i>Null<i>.</p>
+ * @return
+ */
+ Group getParent();
+
+ /**
+ * <p>Get the subgroups contained.</p>
+ * <p>May be <i>Null<i>.</p>
+ * @return
+ */
+ List<Group> getSubGroups();
+}
\ No newline at end of file
Added:
trunk/identity-model/src/main/java/org/jboss/identity/model/relation/RelationshipType.java
===================================================================
---
trunk/identity-model/src/main/java/org/jboss/identity/model/relation/RelationshipType.java
(rev 0)
+++
trunk/identity-model/src/main/java/org/jboss/identity/model/relation/RelationshipType.java 2008-07-09
21:15:16 UTC (rev 10)
@@ -0,0 +1,32 @@
+/*
+ * 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.relation;
+
+/**
+ * Defines a <b>relationship</b> between groups, domains etc
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jul 9, 2008
+ */
+public interface RelationshipType
+{
+ String getName();
+}
\ No newline at end of file