Changed time values in resolver.xml to seconds.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 17 Apr 2003 18:24:46 +0000 (18:24 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 17 Apr 2003 18:24:46 +0000 (18:24 +0000)
Added some javadoc.

git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@573 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AAAttribute.java
src/edu/internet2/middleware/shibboleth/aa/attrresolv/ResolverAttribute.java
src/edu/internet2/middleware/shibboleth/aa/attrresolv/ResolverCache.java
src/edu/internet2/middleware/shibboleth/aa/attrresolv/provider/BaseAttributeDefinition.java
src/edu/internet2/middleware/shibboleth/aa/attrresolv/provider/BaseResolutionPlugIn.java

index a2ab9f6..40e7032 100644 (file)
@@ -80,7 +80,9 @@ public class AAAttribute extends SAMLAttribute implements ResolverAttribute, Arp
 
        private static Logger log = Logger.getLogger(AAAttribute.class.getName());
        private boolean resolved = false;
-       private static long defaultLifetime = 1800000;
+       
+       /** Default lifetime, in seconds **/
+       private static long defaultLifetime = 300;
        private ValueHandler valueHandler = new StringValueHandler();
 
        public AAAttribute(String name) throws SAMLException {
index cbc47f0..8c23cac 100644 (file)
@@ -61,12 +61,28 @@ import edu.internet2.middleware.shibboleth.aa.attrresolv.provider.ValueHandler;
 
 public interface ResolverAttribute {
 
+       /** Returns the Name of the attribute. */
        public String getName();
+
+       /** Boolean indicator of whether the attribute has been resolved by the Attribute Resolver. */
        public boolean resolved();
+
+       /** This method signals that the attribute has been resolved by the Attribute Resolver. */
        public void setResolved();
+
+       /** 
+        * Resolves the attribute based on a previous resolution.
+        * 
+        * @param attribute the previously resolved attribute
+        */
        public void resolveFromCached(ResolverAttribute attribute);
+
+       /** Sets the time, in seconds, for which this attribute is valid. */
        public void setLifetime(long lifetime);
-       public long getLifetime();      
+
+       /** Returns the time, in seconds, for which this attribute is valid. */
+       public long getLifetime();
+
        public void addValue(Object value);
        public Iterator getValues();
        public boolean hasValues();
index 9eb280c..4530b32 100644 (file)
@@ -84,7 +84,7 @@ public class ResolverCache {
                        log.debug("Adding resolved Connector data to Attribute Resolver cache.");
                        connectorDataCache.put(
                                new CacheKey(principal, plugInId),
-                               new CacheObject(toCache, System.currentTimeMillis() + cacheLength));
+                               new CacheObject(toCache, System.currentTimeMillis() + (cacheLength * 1000)));
 
                } else {
                        log.error("Attempted to add bad data to Attribute Resolver cache.");
@@ -97,7 +97,7 @@ public class ResolverCache {
                        log.debug("Adding resolved Attribute data to Attribute Resolver cache.");
                        attributeDataCache.put(
                                new CacheKey(principal, plugInId),
-                               new CacheObject(toCache, System.currentTimeMillis() + cacheLength));
+                               new CacheObject(toCache, System.currentTimeMillis() + (cacheLength * 1000)));
 
                } else {
                        log.error("Attempted to add bad data to Attribute Resolver cache.");
index d5a00bd..dcfae51 100644 (file)
@@ -69,7 +69,9 @@ import edu.internet2.middleware.shibboleth.aa.attrresolv.ResolutionPlugInExcepti
 
 public abstract class BaseAttributeDefinition extends BaseResolutionPlugIn implements AttributeDefinitionPlugIn {
        
+       /** The time, in seconds, for which attribute created from this definition should be valid. */
        protected long lifeTime = -1;
+       
        private static Logger log = Logger.getLogger(BaseAttributeDefinition.class.getName());
        protected Set connectorDependencyIds = new HashSet();
        protected Set attributeDependencyIds = new HashSet();
index 6aaad84..8817142 100644 (file)
@@ -63,7 +63,11 @@ import edu.internet2.middleware.shibboleth.aa.attrresolv.ResolutionPlugInExcepti
 public abstract class BaseResolutionPlugIn {
 
        private static Logger log = Logger.getLogger(BaseResolutionPlugIn.class.getName());
+       
+       /** The identifier for this PlugIn. */
        protected String id;
+
+       /** Time, in seconds, for which the Attribute Resolver should cache resolutions of this PlugIn. */
        protected long ttl = 0;
 
        protected BaseResolutionPlugIn(Element e) throws ResolutionPlugInException {
@@ -84,11 +88,13 @@ public abstract class BaseResolutionPlugIn {
                        }
                }
        }
-
+       
+       /** Returns the identifier for this PlugIn. */
        public String getId() {
                return id;
        }
 
+       /** Returns the time, in seconds, for which the Attribute Resolver should cache resolutions of this PlugIn. */
        public long getTTL() {
                return ttl;
        }