Author: bdaw
Date: 2008-10-21 08:27:10 -0400 (Tue, 21 Oct 2008)
New Revision: 109
Added:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java
Removed:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/FeaturesDescription.java
Log:
readd PaswordAttribute
Added:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java
(rev 0)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/attribute/PasswordAttribute.java 2008-10-21
12:27:10 UTC (rev 109)
@@ -0,0 +1,72 @@
+/*
+ * 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.spi.attribute;
+
+import org.jboss.identity.spi.model.IdentityObjectType;
+import org.jboss.identity.spi.model.IdentityObjectAttribute;
+import org.jboss.identity.spi.policy.PasswordExpirationPolicy;
+
+import java.util.Date;
+
+
+
+/**
+ * Represents a password
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jul 13, 2008
+ */
+public class PasswordAttribute<T extends IdentityObjectType>
+implements IdentityObjectAttribute
+{
+ /**
+ * Password policy governing this attribute.
+ * A null value indicates that there is no policy.
+ */
+ protected PasswordExpirationPolicy<T> passwordPolicy;
+
+ /**
+ * Get the date time when the password was last updated.
+ * The update can be based on password expiration.
+ */
+ protected Date lastUpdated = new Date();
+
+ public PasswordAttribute()
+ {
+ }
+
+ public PasswordAttribute(PasswordExpirationPolicy<T> aPasswordPolicy)
+ {
+ this.passwordPolicy = aPasswordPolicy;
+ }
+
+ public PasswordExpirationPolicy<T> getPasswordPolicy()
+ {
+ return passwordPolicy;
+ }
+
+ public void setPasswordPolicy(PasswordExpirationPolicy<T> passwordPolicy)
+ {
+ this.passwordPolicy = passwordPolicy;
+ }
+
+
+}
\ No newline at end of file
Deleted:
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/FeaturesDescription.java
===================================================================
---
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/FeaturesDescription.java 2008-10-21
12:21:15 UTC (rev 108)
+++
trunk/identity-spi/src/main/java/org/jboss/identity/spi/store/FeaturesDescription.java 2008-10-21
12:27:10 UTC (rev 109)
@@ -1,98 +0,0 @@
-/*
- * 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.spi.store;
-
-import java.util.Set;
-import java.util.Map;
-
-import org.jboss.identity.spi.model.IdentityObjectType;
-import org.jboss.identity.spi.model.IdentityObjectRelationshipType;
-import org.jboss.identity.spi.exception.IdentityTypeNotSupportedException;
-import org.jboss.identity.exception.IdentityException;
-
-/**
- * Describe the features supported by an Identity Store
- * @author boleslaw dot dawidowicz at redhat anotherdot com
- * @author Anil.Saldhana(a)redhat.com
- * @since Jul 10, 2008
- */
-public interface FeaturesDescription
-{
- /**
- * Get the supported operations
- * @param identityObjectType a type representing identity, role, group
- * @return supported operations for given identity type
- * @throws org.jboss.identity.spi.exception.IdentityTypeNotSupportedException
- */
- public Set<OperationType> getSupportedOperations(IdentityObjectType
identityObjectType)
- throws IdentityTypeNotSupportedException;
-
- /**
- * @param operationType
- * @param identityObjectType
- * @return if given operation on given identity type is supported
- * @throws IdentityTypeNotSupportedException
- */
- boolean isOperationSupported(OperationType operationType,
- IdentityObjectType identityObjectType) throws
IdentityTypeNotSupportedException;
-
-
- /**
- * @param operationType
- * @return set of identity types that can be processed with a given operation
- * @throws org.jboss.identity.exception.IdentityException
- */
- public Set<IdentityObjectType> getSupportedIdentityObjectTypes(OperationType
operationType);
-
- /**
- * @return set of identity types that can be persisted
- */
- Set<IdentityObjectType> getSupportedIdentityObjectTypes();
-
- /**
- * @param identityObjectType
- * @return boolean describing if given identity type can be persisted or retrieved
using this identity store
- */
- boolean isIdentityObjectTypeSupported(IdentityObjectType identityObjectType);
-
- /**
- * @param fromType
- * @param toType
- * @param relationshipType
- * @return true is given relationship can be persisted or retrieved
- * @throws org.jboss.identity.exception.IdentityException
- */
- boolean isRelationshipTypeSupported(IdentityObjectType fromType, IdentityObjectType
toType,
- IdentityObjectRelationshipType relationshipType)
- throws IdentityException;
-
- /**
- * @return Set of RelationshipType supported in this store
- */
- Set<IdentityObjectRelationshipType> getSupportedRelationshipTypes();
-
- /**
- * @return A mapping of RelationshipType and IdentityType objects that can have such
relationship in this store
- */
- Map<IdentityObjectRelationshipType, Map<IdentityObjectType,
IdentityObjectType>> getSupportedRelationshipTypeMappings();
-
-}
\ No newline at end of file