pt.digitalis.dif.utils.cache
Enum CacheScope

java.lang.Object
  extended by java.lang.Enum<CacheScope>
      extended by pt.digitalis.dif.utils.cache.CacheScope
All Implemented Interfaces:
Serializable, Comparable<CacheScope>

public enum CacheScope
extends Enum<CacheScope>

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
16 de Mar de 2011

Enum Constant Summary
GLOBAL
          For all requests, if no other level exists
GROUP
          Group scope. for every session of a user of this group.
SESSION
          Session scope.
USER
          User scope. for every session of the same user.
 
Method Summary
protected  String getScopeID()
          Inspector for the 'scopeID' attribute.
static CacheScope GROUPInstance(String groupID)
           
static CacheScope SESSIONInstance(String sessionID)
           
protected  void setScopeID(String scopeID)
          Modifier for the 'scopeID' attribute.
static CacheScope USERInstance(String userID)
           
static CacheScope valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CacheScope[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GLOBAL

public static final CacheScope GLOBAL
For all requests, if no other level exists


GROUP

public static final CacheScope GROUP
Group scope. for every session of a user of this group. Will take precedence over GLOBAL scope


SESSION

public static final CacheScope SESSION
Session scope. Ends with session and is saved within it. Will take precedence above all others


USER

public static final CacheScope USER
User scope. for every session of the same user. Will take precedence over GROUP and GLOBAL scopes

Method Detail

values

public static CacheScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CacheScope c : CacheScope.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CacheScope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

GROUPInstance

public static CacheScope GROUPInstance(String groupID)
Parameters:
groupID -
Returns:
a GROUP instance with the specific group defined

SESSIONInstance

public static CacheScope SESSIONInstance(String sessionID)
Parameters:
sessionID -
Returns:
a SESION instance with the specific session defined

USERInstance

public static CacheScope USERInstance(String userID)
Parameters:
userID -
Returns:
a USER instance with the specific user defined

getScopeID

protected String getScopeID()
Inspector for the 'scopeID' attribute.

Returns:
the scopeID value

setScopeID

protected void setScopeID(String scopeID)
Modifier for the 'scopeID' attribute.

Parameters:
scopeID - the new scopeID value to set


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.