edu.internet2.middleware.grouper.ui.util
Class ObjectAsMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
edu.internet2.middleware.grouper.ui.util.ObjectAsMap
- All Implemented Interfaces:
- Serializable, Cloneable, Map
- Direct Known Subclasses:
- AuditEntryAsMap, CompositeAsMap, FieldAsMap, GroupAsMap, MembershipAsMap, StemAsMap, SubjectAsMap, SubjectPrivilegeAsMap
public class ObjectAsMap
- extends HashMap
Base class for using a Map as a wrapper to an object
- Version:
- $Id: ObjectAsMap.java,v 1.10 2009-10-16 12:16:32 isgwb Exp $
- Author:
- Gary Brown.
- See Also:
- Serialized Form
Method Summary |
Set |
entrySet()
|
Object |
get(Object key)
|
String |
getDateFormat()
|
static ObjectAsMap |
getInstance(String type,
Object object)
Rather than use a constructor directly, the UI reads the implementation type
from media.properties. |
static ObjectAsMap |
getInstance(String type,
Object object,
GrouperSession grouperSession)
Rather than use a constructor directly, the UI reads the implementation type
from media.properties. |
static ObjectAsMap |
getInstance(String type,
Object object,
ResourceBundle bundle)
Rather than use a constructor directly, the UI reads the implementation type
from media.properties. |
static ObjectAsMap |
getInstance(String type,
Subject object)
Rather than use a constructor directly, the UI reads the implementation type
from media.properties. |
static ObjectAsMap |
getInstance(String type,
Subject subject,
GrouperSession grouperSession,
GroupOrStem groupOrStem,
String privilege)
Rather than use a constructor directly, the UI reads the implementation type
from media.properties. |
String |
getObjectType()
|
String |
getString(String key)
|
Object |
getWrappedObject()
|
boolean |
isEmpty()
|
Set |
keySet()
|
void |
setDateFormat(String dateFormat)
|
int |
size()
|
ObjectAsMap
public ObjectAsMap()
ObjectAsMap
public ObjectAsMap(Object obj,
String type)
getObjectType
public String getObjectType()
- Returns:
- notional type of object
getWrappedObject
public Object getWrappedObject()
- Returns:
- object that was wrapped
getString
public String getString(String key)
- Parameters:
key
- to get
- Returns:
- value assumed to be String
get
public Object get(Object key)
- Specified by:
get
in interface Map
- Overrides:
get
in class HashMap
getInstance
public static ObjectAsMap getInstance(String type,
Object object,
GrouperSession grouperSession)
- Rather than use a constructor directly, the UI reads the implementation type
from media.properties. This allows sites to provide alternative implementations
- Parameters:
type
- object
- grouperSession
-
- Returns:
- subclass as configured in media.properties
getInstance
public static ObjectAsMap getInstance(String type,
Subject subject,
GrouperSession grouperSession,
GroupOrStem groupOrStem,
String privilege)
- Rather than use a constructor directly, the UI reads the implementation type
from media.properties. This allows sites to provide alternative implementations
- Parameters:
type
- subject
- grouperSession
- groupOrStem
- privilege
-
- Returns:
- subclass as configured in media.properties
getInstance
public static ObjectAsMap getInstance(String type,
Object object,
ResourceBundle bundle)
- Rather than use a constructor directly, the UI reads the implementation type
from media.properties. This allows sites to provide alternative implementations
- Parameters:
type
- object
- bundle
-
- Returns:
- subclass as configured in media.properties
getInstance
public static ObjectAsMap getInstance(String type,
Object object)
- Rather than use a constructor directly, the UI reads the implementation type
from media.properties. This allows sites to provide alternative implementations
- Parameters:
type
- object
-
- Returns:
- subclass as configured in media.properties
getInstance
public static ObjectAsMap getInstance(String type,
Subject object)
- Rather than use a constructor directly, the UI reads the implementation type
from media.properties. This allows sites to provide alternative implementations
- Parameters:
type
- object
-
- Returns:
- subclass as configured in media.properties
keySet
public Set keySet()
- Specified by:
keySet
in interface Map
- Overrides:
keySet
in class HashMap
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map
- Overrides:
isEmpty
in class HashMap
size
public int size()
- Specified by:
size
in interface Map
- Overrides:
size
in class HashMap
entrySet
public Set entrySet()
- Specified by:
entrySet
in interface Map
- Overrides:
entrySet
in class HashMap
getDateFormat
public String getDateFormat()
setDateFormat
public void setDateFormat(String dateFormat)