org.fcrepo.server.security.servletfilters
Class CacheElement

java.lang.Object
  extended by org.fcrepo.server.security.servletfilters.CacheElement

public class CacheElement
extends Object

Author:
Bill Niebel

Constructor Summary
CacheElement(String userid, String cacheid, String cacheabbrev)
          Create a new cache element with the given userid.
 
Method Summary
 void audit()
           
 Boolean authenticate(Cache cache, String pwd)
          If in the valid state and not expired: If authenticated and given password is instance password, return true.
 String getInstanceId()
           
 Map getNamedValues(Cache cache, String pwd)
           
 String getUserid()
          Gets the user id associated with this cache element.
 void populate(Boolean authenticated, Set predicates, Map namedValues, String errorMessage)
          Populates this cache element with the given authenticated state and named values, then puts it in the valid state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheElement

public CacheElement(String userid,
                    String cacheid,
                    String cacheabbrev)
Create a new cache element with the given userid. Note: The element will start in the invalid state.

Method Detail

getUserid

public String getUserid()
Gets the user id associated with this cache element.


populate

public final void populate(Boolean authenticated,
                           Set predicates,
                           Map namedValues,
                           String errorMessage)
Populates this cache element with the given authenticated state and named values, then puts it in the valid state. Note: Prior to the call, the element must be in the invalid state. TODO: The predicates parameter is deprecated and should be removed. For now, callers can avoid a warning by giving it as null.


authenticate

public final Boolean authenticate(Cache cache,
                                  String pwd)
If in the valid state and not expired: If authenticated and given password is instance password, return true. Else return false. If invalid or expired: Re-initialize this element by setting it to invalid state and running the underlying authN code. If never authenticated or currently not valid, return m_authenticated If authenticated, set thekkkk instance password to the given one and return true. If not authenticated, return false.


getNamedValues

public final Map getNamedValues(Cache cache,
                                String pwd)

getInstanceId

public String getInstanceId()

audit

public final void audit()


Copyright © 2012 DuraSpace. All Rights Reserved.