Package com.thoughtworks.xstream.mapper
Class SecurityMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.SecurityMapper
- All Implemented Interfaces:
Mapper
A Mapper implementation injecting a security layer based on permission rules for any type required in the
unmarshalling process.
- Since:
- 1.4.7
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSecurityMapper
(Mapper wrapped) Construct a SecurityMapper.SecurityMapper
(Mapper wrapped, TypePermission[] permissions) Construct a SecurityMapper. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPermission
(TypePermission permission) Add a new permission.How a serialized class representation should be mapped back to a real class.Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realMember, serializedClass, serializedMember, shouldSerializeMember
-
Field Details
-
permissions
-
-
Constructor Details
-
SecurityMapper
Construct a SecurityMapper.- Parameters:
wrapped
- the mapper chain- Since:
- 1.4.7
-
SecurityMapper
Construct a SecurityMapper.- Parameters:
wrapped
- the mapper chainpermissions
- the predefined permissions- Since:
- 1.4.7
-
-
Method Details
-
addPermission
Add a new permission.Permissions are evaluated in the added sequence. An instance of
NoTypePermission
orAnyTypePermission
will implicitly wipe any existing permission.- Parameters:
permission
- the permission to add.- Since:
- 1.4.7
-
realClass
Description copied from interface:Mapper
How a serialized class representation should be mapped back to a real class.- Specified by:
realClass
in interfaceMapper
- Overrides:
realClass
in classMapperWrapper
-