Package org.glassfish.hk2.xml.internal
Class NamespaceBeanLikeMapImpl
java.lang.Object
org.glassfish.hk2.xml.internal.NamespaceBeanLikeMapImpl
- All Implemented Interfaces:
Serializable,NamespaceBeanLikeMap
- Author:
- jwells
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbackup()Create a backup of all namespaces at this point.getBeanLikeMap(Map<String, String> namespaceToPrefixMap) Gets the bean-like map given the set of prefixes to use for the various namespaces.Gets a raw copy of the bean-like map.Gets a map from QName to value.Gets the value for key based on the namespace.booleanDetermines if the value for key based on namespace has been explicitly set.voidrestoreBackup(boolean drop) Either drop the backup data or restore the current data to the backup.voidSets the value for key based on the namespace.voidshallowCopy(NamespaceBeanLikeMap copyFrom, ModelImpl copyModel, boolean copyReferences) Does a shallow copy from another namespace bean-like map to this onetoString()
-
Constructor Details
-
NamespaceBeanLikeMapImpl
public NamespaceBeanLikeMapImpl()
-
-
Method Details
-
getValue
Description copied from interface:NamespaceBeanLikeMapGets the value for key based on the namespace. Locking must be done by the caller- Specified by:
getValuein interfaceNamespaceBeanLikeMap- Parameters:
namespace- if null or the empty string the default namespace will be usedkey- the non-null key- Returns:
- The value if found (may be null) or
null if not set (use
NamespaceBeanLikeMap.isSet(String, String)to determine if a value has been set
-
setValue
Description copied from interface:NamespaceBeanLikeMapSets the value for key based on the namespace. Locking must be done by the caller- Specified by:
setValuein interfaceNamespaceBeanLikeMap- Parameters:
namespace- if null or the empty string the default namespace will be usedkey- the non-null keyvalue- The value to set this key to (may be null)
-
isSet
Description copied from interface:NamespaceBeanLikeMapDetermines if the value for key based on namespace has been explicitly set. Locking must be done by the caller- Specified by:
isSetin interfaceNamespaceBeanLikeMap- Parameters:
namespace- if null or the empty string the default namespace will be usedkey- the non-null key- Returns:
- true if the value is explicitly set, false otherwise
-
backup
public void backup()Description copied from interface:NamespaceBeanLikeMapCreate a backup of all namespaces at this point. Locking must be done by the caller- Specified by:
backupin interfaceNamespaceBeanLikeMap
-
restoreBackup
public void restoreBackup(boolean drop) Description copied from interface:NamespaceBeanLikeMapEither drop the backup data or restore the current data to the backup. Locking must be done by the caller- Specified by:
restoreBackupin interfaceNamespaceBeanLikeMap- Parameters:
drop- if true the backup should be dropped, if false the current data should be made the same as the backup
-
getBeanLikeMap
Description copied from interface:NamespaceBeanLikeMapGets the bean-like map given the set of prefixes to use for the various namespaces. Note that if a namespace is not found in the map the values from that namespace will not be included in the returned map. Locking must be handled by the caller- Specified by:
getBeanLikeMapin interfaceNamespaceBeanLikeMap- Parameters:
namespaceToPrefixMap- A map from namespace to the prefix that should be put on the keys for the namespace- Returns:
- A map with the fully qualified bean-like names
-
shallowCopy
Description copied from interface:NamespaceBeanLikeMapDoes a shallow copy from another namespace bean-like map to this one- Specified by:
shallowCopyin interfaceNamespaceBeanLikeMap- Parameters:
copyFrom- The other namesapce bean-like map to copycopyModel- The model to use to determine what fields to copycopyReferences- true if references should also be copied
-
getNamespaceBeanLikeMap
Description copied from interface:NamespaceBeanLikeMapGets a raw copy of the bean-like map. The outer map has namespace keys (including one for default) and the inner map is the bean-like map for that namespace. The map returned is not a copy, so any changes to it will affect the underlying object (so don't change it)- Specified by:
getNamespaceBeanLikeMapin interfaceNamespaceBeanLikeMap- Returns:
-
getQNameMap
Description copied from interface:NamespaceBeanLikeMapGets a map from QName to value. Default namespace is not taken into account- Specified by:
getQNameMapin interfaceNamespaceBeanLikeMap- Returns:
- A non-null map from QName to value
-
toString
-