[seam-commits] Seam SVN: r13080 - in modules/security/trunk: impl/src/main/java/org/jboss/seam/security/management and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jun 7 21:11:26 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-06-07 21:11:25 -0400 (Mon, 07 Jun 2010)
New Revision: 13080
Removed:
modules/security/trunk/api/src/main/java/org/jboss/seam/security/management/IdentityStore.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/PicketLinkIdentityStore.java
Modified:
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
Log:
use picketlink identitystore api
Deleted: modules/security/trunk/api/src/main/java/org/jboss/seam/security/management/IdentityStore.java
===================================================================
--- modules/security/trunk/api/src/main/java/org/jboss/seam/security/management/IdentityStore.java 2010-06-07 17:23:29 UTC (rev 13079)
+++ modules/security/trunk/api/src/main/java/org/jboss/seam/security/management/IdentityStore.java 2010-06-08 01:11:25 UTC (rev 13080)
@@ -1,256 +0,0 @@
-package org.jboss.seam.security.management;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.picketlink.idm.api.Credential;
-import org.picketlink.idm.api.Group;
-import org.picketlink.idm.api.IdentityType;
-import org.picketlink.idm.api.Role;
-
-/**
- * The identity store does the actual work of persisting user accounts and roles in a
- * database, LDAP directory, etc.
- *
- * @author Shane Bryzak
- */
-public interface IdentityStore
-{
- public enum Feature { createUser, deleteUser, enableUser, disableUser,
- changePassword, createRole, deleteRole, grantRole, revokeRole,
- createGroup, addToGroup, removeFromGroup, deleteGroup }
-
- /**
- * Represents a set of optional features that an IdentityStore implementation might support.
- */
- public class FeatureSet implements Serializable
- {
- private static final long serialVersionUID = 1100272929055626911L;
-
- private Set<Feature> features;
-
- public FeatureSet()
- {
- this(null);
- }
-
- public FeatureSet(Set<Feature> features)
- {
- if (features != null)
- {
- this.features = features;
- }
- else
- {
- this.features = new HashSet<Feature>();
- }
- }
-
- public Set<Feature> getFeatures()
- {
- return features;
- }
-
- public boolean supports(Feature feature)
- {
- return features.contains(feature);
- }
-
- public void addFeature(Feature feature)
- {
- features.add(feature);
- }
-
- public void removeFeature(Feature feature)
- {
- features.remove(feature);
- }
-
- public void enableAll()
- {
- for (Feature f : Feature.values()) addFeature(f);
- }
- }
-
- /**
- * Returns true if the IdentityStore implementation supports the specified feature.
- *
- */
- boolean supportsFeature(Feature feature);
-
- /**
- * Creates a new user with the specified username and credential.
- * @return true if the user was successfully created.
- */
- boolean createUser(String username, Credential credential, Map<String,?> attributes);
-
- /**
- * Deletes the user with the specified username.
- * @return true if the user was successfully deleted.
- */
- boolean deleteUser(String username);
-
- /**
- * Enables the user with the specified username. Enabled users are able to authenticate.
- * @return true if the specified user was successfully enabled.
- */
- boolean enableUser(String username);
-
- /**
- * Disables the user with the specified username. Disabled users are unable to authenticate.
- * @return true if the specified user was successfully disabled.
- */
- boolean disableUser(String username);
-
- /**
- * Returns true if the specified user is enabled.
- */
- boolean isUserEnabled(String username);
-
- /**
- * Updates the credential of the specified user.
- * @return true if the user's credential was successfully changed.
- */
- boolean updateCredential(String username, Credential credential);
-
- /**
- * Returns true if the specified user exists.
- */
- boolean userExists(String username);
-
- /**
- *
- * @param username
- * @param attribute
- * @param value
- * @return
- */
- boolean setUserAttribute(String username, String attribute, Object value);
-
- /**
- *
- * @param username
- * @param attribute
- * @return
- */
- boolean deleteUserAttribute(String username, String attribute);
-
- /**
- * Creates a new role type with the specified role type name.
- * @return true if the role type was created successfully.
- */
- boolean createRoleType(String roleType);
-
- /**
- * Grants the specified role to the specified user.
- *
- * @param name The name of the user
- * @param roleType The name of the role type to grant to the user.
- * @param groupName The name of the group to grant the role in
- * @param groupType The group type
- * @return true if the role was successfully granted.
- */
- boolean grantRole(String username, String roleType, String groupName, String groupType);
-
- /**
- * Revokes the specified role from the specified user.
- *
- * @param name The name of the user
- * @param roleType The name of the role type to revoke from the user.
- * @param groupName The name of the group which contains the user role
- * @param groupType The group type
- * @return true if the role was successfully revoked.
- */
- boolean revokeRole(String username, String roleType, String groupName, String groupType);
-
- /**
- * Deletes the specified role type.
- * @return true if the role type was successfully deleted.
- */
- boolean deleteRoleType(String roleType);
-
- /**
- * Returns true if the specified role type exists.
- */
- boolean roleTypeExists(String roleType);
-
- /**
- * Creates a new group with the specified name
- *
- * @param name The name of the group
- * @return true if the group was created successfully
- */
- boolean createGroup(String name, String groupType);
-
- boolean associateUser(String groupName, String groupType, String username);
-
- boolean disassociateUser(String groupName, String groupType, String username);
-
- boolean associateGroup(String groupName, String groupType, String memberGroupName, String memberGroupType);
-
- boolean disassociateGroup(String groupName, String groupType, String memberGroupName, String memberGroupType);
-
- /**
- * Deletes the specified group
- *
- * @param group The name of the group to delete
- * @return true if the group was successfully deleted
- */
- boolean deleteGroup(String name, String groupType);
-
- /**
- *
- * @param name
- * @param type
- * @return
- */
- Group findGroup(String name, String groupType);
-
- /**
- * Returns a list of all user names containing the specified filter text within their username.
- */
- List<String> findUsers(String filter);
-
- /**
- * Returns a list of all the role types.
- */
- List<String> listRoleTypes();
-
- /**
- * Returns a list of role types that can be granted (i.e, excluding conditional roles)
- */
- List<String> listGrantableRoleTypes();
-
- /**
- * Returns a list of all the roles explicitly granted to the specified user.
- */
- List<Role> listGrantedRoles(String username);
-
- /**
- * Returns a list of all roles that the specified user is a member of. This list may contain
- * roles that may not have been explicitly granted to the user, which are indirectly implied
- * due to role memberships.
-
- */
- List<Role> listImpliedRoles(String username);
-
- /**
- * Lists the members of the specified role
- */
- List<IdentityType> listRoleMembers(String roleType, String groupName, String groupType);
-
- /**
- * Lists the members of the specified group
- */
- List<IdentityType> listGroupMembers(Group group);
-
- /**
- * Authenticates the specified user, using the specified credential.
- *
- * @return true if authentication is successful.
- */
- boolean authenticate(String username, Credential credential);
-}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java 2010-06-07 17:23:29 UTC (rev 13079)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/IdentityManagerImpl.java 2010-06-08 01:11:25 UTC (rev 13080)
@@ -1,8 +1,6 @@
package org.jboss.seam.security.management;
import java.io.Serializable;
-import java.util.Collections;
-import java.util.Comparator;
import java.util.List;
import javax.annotation.PostConstruct;
@@ -14,7 +12,6 @@
import org.jboss.seam.security.Identity;
import org.jboss.seam.security.util.Strings;
import org.picketlink.idm.api.Credential;
-import org.picketlink.idm.api.Group;
import org.picketlink.idm.api.IdentityType;
import org.picketlink.idm.api.Role;
import org.slf4j.Logger;
@@ -44,101 +41,94 @@
@Inject BeanManager manager;
@Inject Identity identity;
- protected IdentityStore identityStore;
- protected IdentityStore roleIdentityStore;
- protected IdentityStore groupIdentityStore;
-
@PostConstruct
public void create()
{
- if (roleIdentityStore == null && identityStore != null)
- {
- roleIdentityStore = identityStore;
- }
- if (identityStore == null)
- {
- log.warn("No identity store available - please configure an identityStore if identity " +
- "management is required.");
- }
-
- if (roleIdentityStore == null)
- {
- log.warn("No role identity store available - please configure a roleIdentityStore if identity " +
- "management is required.");
- }
}
public boolean createUser(String name, Credential credential)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_CREATE);
- return identityStore.createUser(name, credential, null);
+ //return identityStore.createUser(name, credential, null);
+ return false;
}
public boolean deleteUser(String name)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_DELETE);
- return identityStore.deleteUser(name);
+ //return identityStore.deleteUser(name);
+ return false;
}
public boolean enableUser(String name)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return identityStore.enableUser(name);
+ //return identityStore.enableUser(name);
+ return false;
}
public boolean disableUser(String name)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return identityStore.disableUser(name);
+ //return identityStore.disableUser(name);
+ return false;
}
public boolean updateCredential(String name, Credential credential)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return identityStore.updateCredential(name, credential);
+ //return identityStore.updateCredential(name, credential);
+ return false;
}
public boolean isUserEnabled(String name)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_READ);
- return identityStore.isUserEnabled(name);
+ //return identityStore.isUserEnabled(name);
+ return false;
}
public boolean setUserAttribute(String username, String attribute, Object value)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return identityStore.setUserAttribute(username, attribute, value);
+ //return identityStore.setUserAttribute(username, attribute, value);
+ return false;
}
public boolean deleteUserAttribute(String username, String attribute)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return identityStore.deleteUserAttribute(username, attribute);
+ //return identityStore.deleteUserAttribute(username, attribute);
+ return false;
}
public boolean grantRole(String name, String role, String groupName, String groupType)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return roleIdentityStore.grantRole(name, role, groupName, groupType);
+ //return roleIdentityStore.grantRole(name, role, groupName, groupType);
+ return false;
}
public boolean revokeRole(String name, String role, String groupName, String groupType)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return roleIdentityStore.revokeRole(name, role, groupName, groupType);
+ //return roleIdentityStore.revokeRole(name, role, groupName, groupType);
+ return false;
}
public boolean associateUser(String groupName, String groupType, String username)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return identityStore.associateUser(groupName, groupType, username);
+ //return identityStore.associateUser(groupName, groupType, username);
+ return false;
}
public boolean disassociateUser(String groupName, String groupType, String username)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_UPDATE);
- return identityStore.disassociateUser(groupName, groupType, username);
+ //return identityStore.disassociateUser(groupName, groupType, username);
+ return false;
}
public boolean associateGroup(String groupName, String groupType, String memberGroupName, String memberGroupType)
@@ -154,77 +144,65 @@
public boolean createRoleType(String roleType)
{
identity.checkPermission(ROLE_PERMISSION_NAME, PERMISSION_CREATE);
- return roleIdentityStore.createRoleType(roleType);
+ //return roleIdentityStore.createRoleType(roleType);
+ return false;
}
public boolean deleteRoleType(String roleType)
{
identity.checkPermission(ROLE_PERMISSION_NAME, PERMISSION_DELETE);
- return roleIdentityStore.deleteRoleType(roleType);
+ //return roleIdentityStore.deleteRoleType(roleType);
+ return false;
}
public boolean createGroup(String groupName, String groupType)
{
identity.checkPermission(GROUP_PERMISSION_NAME, PERMISSION_CREATE);
- return groupIdentityStore.createGroup(groupName, groupType);
+ //return groupIdentityStore.createGroup(groupName, groupType);
+ return false;
}
public boolean deleteGroup(String groupName, String groupType)
{
identity.checkPermission(GROUP_PERMISSION_NAME, PERMISSION_DELETE);
- return groupIdentityStore.deleteGroup(groupName, groupType);
+ //return groupIdentityStore.deleteGroup(groupName, groupType);
+ return false;
}
public boolean userExists(String name)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_READ);
- return identityStore.userExists(name);
+ //return identityStore.userExists(name);
+ return false;
}
public boolean roleTypeExists(String roleType)
{
- return roleIdentityStore.roleTypeExists(roleType);
+ //return roleIdentityStore.roleTypeExists(roleType);
+ return false;
}
public List<String> findUsers(String filter)
{
identity.checkPermission(USER_PERMISSION_NAME, PERMISSION_READ);
- List<String> users = identityStore.findUsers(filter);
+ //List<String> users = identityStore.findUsers(filter);
- Collections.sort(users, new Comparator<String>() {
- public int compare(String value1, String value2) {
- return value1.compareTo(value2);
- }
- });
-
- return users;
+ return null;
}
public List<String> listRoleTypes()
{
identity.checkPermission(ROLE_PERMISSION_NAME, PERMISSION_READ);
- List<String> roles = roleIdentityStore.listRoleTypes();
+ //List<String> roles = roleIdentityStore.listRoleTypes();
- Collections.sort(roles, new Comparator<String>() {
- public int compare(String value1, String value2) {
- return value1.compareTo(value2);
- }
- });
-
- return roles;
+ return null;
}
public List<String> getGrantableRoles()
{
- List<String> roles = roleIdentityStore.listGrantableRoleTypes();
+ //List<String> roles = roleIdentityStore.listGrantableRoleTypes();
- Collections.sort(roles, new Comparator<String>() {
- public int compare(String value1, String value2) {
- return value1.compareTo(value2);
- }
- });
-
- return roles;
+ return null;
}
/**
@@ -235,7 +213,8 @@
*/
public List<Role> getGrantedRoles(String username)
{
- return roleIdentityStore.listGrantedRoles(username);
+ //return roleIdentityStore.listGrantedRoles(username);
+ return null;
}
/**
@@ -246,43 +225,23 @@
*/
public List<Role> getImpliedRoles(String username)
{
- return roleIdentityStore.listImpliedRoles(username);
+ //return roleIdentityStore.listImpliedRoles(username);
+ return null;
}
public List<IdentityType> listRoleMembers(String roleType, String groupName, String groupType)
{
identity.checkPermission(ROLE_PERMISSION_NAME, PERMISSION_READ);
- return roleIdentityStore.listRoleMembers(roleType, groupName, groupType);
+ //return roleIdentityStore.listRoleMembers(roleType, groupName, groupType);
+ return null;
}
public boolean authenticate(String username, Credential credential)
{
if (Strings.isEmpty(username)) return false;
- return identityStore.authenticate(username, credential);
+ //return identityStore.authenticate(username, credential);
+ return false;
}
- public IdentityStore getIdentityStore()
- {
- return identityStore;
- }
-
- public void setIdentityStore(IdentityStore identityStore)
- {
- this.identityStore = identityStore;
- }
-
- public IdentityStore getRoleIdentityStore()
- {
- return roleIdentityStore;
- }
-
- public void setRoleIdentityStore(IdentityStore roleIdentityStore)
- {
- this.roleIdentityStore = roleIdentityStore;
- }
-
- public boolean isEnabled()
- {
- return identityStore != null && roleIdentityStore != null;
- }
+
}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java 2010-06-07 17:23:29 UTC (rev 13079)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java 2010-06-08 01:11:25 UTC (rev 13080)
@@ -3,9 +3,11 @@
import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Instance;
@@ -25,8 +27,23 @@
import org.picketlink.idm.api.Group;
import org.picketlink.idm.api.IdentityType;
import org.picketlink.idm.api.Role;
+import org.picketlink.idm.common.exception.IdentityException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.picketlink.idm.spi.configuration.IdentityStoreConfigurationContext;
+import org.picketlink.idm.spi.configuration.metadata.IdentityObjectAttributeMetaData;
+import org.picketlink.idm.spi.exception.OperationNotSupportedException;
+import org.picketlink.idm.spi.model.IdentityObject;
+import org.picketlink.idm.spi.model.IdentityObjectAttribute;
+import org.picketlink.idm.spi.model.IdentityObjectCredential;
+import org.picketlink.idm.spi.model.IdentityObjectRelationship;
+import org.picketlink.idm.spi.model.IdentityObjectRelationshipType;
+import org.picketlink.idm.spi.model.IdentityObjectType;
+import org.picketlink.idm.spi.search.IdentityObjectSearchCriteria;
+import org.picketlink.idm.spi.store.FeaturesMetaData;
+import org.picketlink.idm.spi.store.IdentityStore;
+import org.picketlink.idm.spi.store.IdentityStoreInvocationContext;
+import org.picketlink.idm.spi.store.IdentityStoreSession;
/**
* IdentityStore implementation that allows identity related data to be
@@ -34,7 +51,7 @@
*
* @author Shane Bryzak
*/
-public @ApplicationScoped class JpaIdentityStore implements IdentityStore, Serializable
+public @ApplicationScoped class JpaIdentityStore implements org.picketlink.idm.spi.store.IdentityStore, Serializable
{
private static final long serialVersionUID = 7729139146633529501L;
@@ -65,6 +82,7 @@
private static final String PROPERTY_RELATIONSHIP_NAME = "RELATIONSHIP_NAME";
private static final String PROPERTY_ATTRIBUTE_NAME = "ATTRIBUTE_NAME";
private static final String PROPERTY_ATTRIBUTE_VALUE = "ATTRIBUTE_VALUE";
+ private static final String PROPERTY_ROLE_TYPE_NAME = "ROLE_TYPE_NAME";
// Entity classes
@@ -682,12 +700,41 @@
p);
}
- // TODO scan any entity classes referenced by the identity class also
+ // scan any entity classes referenced by the identity class also
+ props = PropertyQueries.createQuery(identityClass)
+ .getResultList();
+
+ for (Property<Object> p : props)
+ {
+ if (p.getJavaClass().isAnnotationPresent(Entity.class))
+ {
+ List<Property<Object>> pp = PropertyQueries.createQuery(p.getJavaClass())
+ .addCriteria(new PropertyTypeCriteria(PropertyType.ATTRIBUTE))
+ .getResultList();
+
+ for (Property<Object> attributeProperty : pp)
+ {
+ attributeProperties.put(
+ attributeProperty.getAnnotatedElement().getAnnotation(IdentityProperty.class).attributeName(),
+ attributeProperty);
+ }
+ }
+ }
}
protected void configureRoleTypeNames()
{
-
+ if (roleTypeClass != null)
+ {
+ List<Property<Object>> props = PropertyQueries.createQuery(roleTypeClass)
+ .addCriteria(new PropertyTypeCriteria(PropertyType.NAME))
+ .getResultList();
+
+ if (props.size() == 1)
+ {
+ modelProperties.put(PROPERTY_ROLE_TYPE_NAME, props.get(0));
+ }
+ }
}
public String getUserIdentityType()
@@ -760,10 +807,10 @@
throw new IdentityManagementException("Could not create user, identityObjectEntity not set.");
}
- if (userExists(username))
- {
- log.warn("Could not create user, already exists.");
- }
+ //if (userExists(username))
+ //{
+ // log.warn("Could not create user, already exists.");
+ //}
Object userInstance = identityClass.newInstance();
Object credentialInstance = null;
@@ -842,178 +889,307 @@
}
}
- public boolean associateUser(String groupName, String groupType, String username)
+ public void bootstrap(IdentityStoreConfigurationContext configurationContext)
+ throws IdentityException
{
- return false;
+ // TODO Auto-generated method stub
+
}
-
- public boolean disassociateUser(String groupName, String groupType, String username)
+
+ public IdentityObject createIdentityObject(
+ IdentityStoreInvocationContext invocationCtx, String name,
+ IdentityObjectType identityObjectType) throws IdentityException
{
- return false;
+ // TODO Auto-generated method stub
+ return null;
}
-
- public boolean associateGroup(String groupName, String groupType, String memberGroupName, String memberGroupType)
+
+ public IdentityObject createIdentityObject(
+ IdentityStoreInvocationContext invocationCtx, String name,
+ IdentityObjectType identityObjectType, Map<String, String[]> attributes)
+ throws IdentityException
{
- return false;
+ // TODO Auto-generated method stub
+ return null;
}
-
- public boolean disassociateGroup(String groupName, String groupType, String memberGroupName, String memberGroupType)
+
+ public IdentityObjectRelationship createRelationship(
+ IdentityStoreInvocationContext invocationCxt,
+ IdentityObject fromIdentity, IdentityObject toIdentity,
+ IdentityObjectRelationshipType relationshipType,
+ String relationshipName, boolean createNames) throws IdentityException
{
- return false;
+ // TODO Auto-generated method stub
+ return null;
}
- public boolean authenticate(String username, Credential credential)
+ public String createRelationshipName(IdentityStoreInvocationContext ctx,
+ String name) throws IdentityException, OperationNotSupportedException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean createGroup(String name, String groupType)
+ public IdentityObject findIdentityObject(
+ IdentityStoreInvocationContext invocationContext, String id)
+ throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean createRoleType(String roleType)
+ public IdentityObject findIdentityObject(
+ IdentityStoreInvocationContext invocationContext, String name,
+ IdentityObjectType identityObjectType) throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean deleteGroup(String name, String groupType)
+ public Collection<IdentityObject> findIdentityObject(
+ IdentityStoreInvocationContext invocationCtx,
+ IdentityObjectType identityType, IdentityObjectSearchCriteria criteria)
+ throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean deleteRoleType(String roleType)
+ public Collection<IdentityObject> findIdentityObject(
+ IdentityStoreInvocationContext invocationCxt, IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType, boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean deleteUser(String username)
+ public String getId()
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean deleteUserAttribute(String username, String attribute)
+ public int getIdentityObjectsCount(
+ IdentityStoreInvocationContext invocationCtx,
+ IdentityObjectType identityType) throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+ return 0;
}
- public boolean disableUser(String username)
+ public Map<String, String> getRelationshipNameProperties(
+ IdentityStoreInvocationContext ctx, String name)
+ throws IdentityException, OperationNotSupportedException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean enableUser(String username)
+ public Set<String> getRelationshipNames(IdentityStoreInvocationContext ctx,
+ IdentityObjectSearchCriteria criteria) throws IdentityException,
+ OperationNotSupportedException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public Group findGroup(String name, String groupType)
+ public Set<String> getRelationshipNames(IdentityStoreInvocationContext ctx,
+ IdentityObject identity, IdentityObjectSearchCriteria criteria)
+ throws IdentityException, OperationNotSupportedException
{
// TODO Auto-generated method stub
return null;
}
- public List<String> findUsers(String filter)
+ public Map<String, String> getRelationshipProperties(
+ IdentityStoreInvocationContext ctx,
+ IdentityObjectRelationship relationship) throws IdentityException,
+ OperationNotSupportedException
{
// TODO Auto-generated method stub
return null;
}
- public boolean grantRole(String username, String roleType, String groupName,
- String groupType)
+ public FeaturesMetaData getSupportedFeatures()
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean isUserEnabled(String username)
+ public void removeIdentityObject(
+ IdentityStoreInvocationContext invocationCtx, IdentityObject identity)
+ throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+
}
- public List<String> listGrantableRoleTypes()
+ public void removeRelationship(IdentityStoreInvocationContext invocationCxt,
+ IdentityObject fromIdentity, IdentityObject toIdentity,
+ IdentityObjectRelationshipType relationshipType,
+ String relationshipName) throws IdentityException
{
// TODO Auto-generated method stub
- return null;
+
}
- public List<Role> listGrantedRoles(String username)
+ public String removeRelationshipName(IdentityStoreInvocationContext ctx,
+ String name) throws IdentityException, OperationNotSupportedException
{
// TODO Auto-generated method stub
return null;
}
- public List<IdentityType> listGroupMembers(Group group)
+ public void removeRelationshipNameProperties(
+ IdentityStoreInvocationContext ctx, String name, Set<String> properties)
+ throws IdentityException, OperationNotSupportedException
{
// TODO Auto-generated method stub
+
+ }
+
+ public void removeRelationshipProperties(IdentityStoreInvocationContext ctx,
+ IdentityObjectRelationship relationship, Set<String> properties)
+ throws IdentityException, OperationNotSupportedException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeRelationships(
+ IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity1, IdentityObject identity2, boolean named)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Set<IdentityObjectRelationship> resolveRelationships(
+ IdentityStoreInvocationContext invocationCxt,
+ IdentityObject fromIdentity, IdentityObject toIdentity,
+ IdentityObjectRelationshipType relationshipType)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
return null;
}
- public List<Role> listImpliedRoles(String username)
+ public Set<IdentityObjectRelationship> resolveRelationships(
+ IdentityStoreInvocationContext invocationCxt, IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType, boolean parent,
+ boolean named, String name) throws IdentityException
{
// TODO Auto-generated method stub
return null;
}
- public List<IdentityType> listRoleMembers(String roleType, String groupName,
- String groupType)
+ public void setRelationshipNameProperties(
+ IdentityStoreInvocationContext ctx, String name,
+ Map<String, String> properties) throws IdentityException,
+ OperationNotSupportedException
{
// TODO Auto-generated method stub
+
+ }
+
+ public void setRelationshipProperties(IdentityStoreInvocationContext ctx,
+ IdentityObjectRelationship relationship, Map<String, String> properties)
+ throws IdentityException, OperationNotSupportedException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateCredential(IdentityStoreInvocationContext ctx,
+ IdentityObject identityObject, IdentityObjectCredential credential)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean validateCredential(IdentityStoreInvocationContext ctx,
+ IdentityObject identityObject, IdentityObjectCredential credential)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void addAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity, IdentityObjectAttribute[] attributes)
+ throws IdentityException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public IdentityObject findIdentityObjectByUniqueAttribute(
+ IdentityStoreInvocationContext invocationCtx,
+ IdentityObjectType identityObjectType,
+ IdentityObjectAttribute attribute) throws IdentityException
+ {
+ // TODO Auto-generated method stub
return null;
}
- public List<String> listRoleTypes()
+ public IdentityObjectAttribute getAttribute(
+ IdentityStoreInvocationContext invocationContext,
+ IdentityObject identity, String name) throws IdentityException
{
// TODO Auto-generated method stub
return null;
}
- public boolean revokeRole(String username, String roleType,
- String groupName, String groupType)
+ public Map<String, IdentityObjectAttribute> getAttributes(
+ IdentityStoreInvocationContext invocationContext,
+ IdentityObject identity) throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean roleTypeExists(String roleType)
+ public Map<String, IdentityObjectAttributeMetaData> getAttributesMetaData(
+ IdentityStoreInvocationContext invocationContext,
+ IdentityObjectType identityType)
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean setUserAttribute(String username, String attribute,
- Object value)
+ public Set<String> getSupportedAttributeNames(
+ IdentityStoreInvocationContext invocationContext,
+ IdentityObjectType identityType) throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+ return null;
}
- public boolean supportsFeature(Feature feature)
+ public void removeAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity, String[] attributeNames)
+ throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+
}
- public boolean updateCredential(String username, Credential credential)
+ public void updateAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity, IdentityObjectAttribute[] attributes)
+ throws IdentityException
{
// TODO Auto-generated method stub
- return false;
+
}
- public boolean userExists(String username)
+ public IdentityStoreSession createIdentityStoreSession()
+ throws IdentityException
{
// TODO Auto-generated method stub
- return false;
- }
+ return null;
+ }
+
+
}
Deleted: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/PicketLinkIdentityStore.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/PicketLinkIdentityStore.java 2010-06-07 17:23:29 UTC (rev 13079)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/PicketLinkIdentityStore.java 2010-06-08 01:11:25 UTC (rev 13080)
@@ -1,211 +0,0 @@
-package org.jboss.seam.security.management.picketlink;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.enterprise.context.Dependent;
-import javax.inject.Inject;
-
-import org.jboss.seam.security.management.IdentityStore;
-import org.picketlink.idm.api.Credential;
-import org.picketlink.idm.api.Group;
-import org.picketlink.idm.api.IdentitySession;
-import org.picketlink.idm.api.IdentityType;
-import org.picketlink.idm.api.Role;
-
- at Dependent
-public class PicketLinkIdentityStore implements IdentityStore
-{
- @Inject IdentitySession identitySession;
-
- public boolean associateGroup(String groupName, String groupType,
- String memberGroupName, String memberGroupType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean associateUser(String groupName, String groupType,
- String username)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean authenticate(String username, Credential credential)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean createGroup(String name, String groupType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean createRoleType(String roleType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean createUser(String username, Credential credential,
- Map<String, ?> attributes)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean deleteGroup(String name, String groupType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean deleteRoleType(String roleType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean deleteUser(String username)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean deleteUserAttribute(String username, String attribute)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean disableUser(String username)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean disassociateGroup(String groupName, String groupType,
- String memberGroupName, String memberGroupType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean disassociateUser(String groupName, String groupType,
- String username)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean enableUser(String username)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public Group findGroup(String name, String groupType)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<String> findUsers(String filter)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean grantRole(String username, String roleType, String groupName,
- String groupType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isUserEnabled(String username)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public List<String> listGrantableRoleTypes()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<Role> listGrantedRoles(String username)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<IdentityType> listGroupMembers(Group group)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<Role> listImpliedRoles(String username)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<IdentityType> listRoleMembers(String roleType, String groupName,
- String groupType)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<String> listRoleTypes()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean revokeRole(String username, String roleType,
- String groupName, String groupType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean roleTypeExists(String roleType)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean setUserAttribute(String username, String attribute,
- Object value)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean supportsFeature(Feature feature)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean updateCredential(String username, Credential credential)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean userExists(String username)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
-
-}
More information about the seam-commits
mailing list