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 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 TypeMethodDescriptionvoidaddPermission(TypePermission permission) Add a new permission.How a serialized class representation should be mapped back to a real class.Methods inherited from class 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
NoTypePermissionorAnyTypePermissionwill implicitly wipe any existing permission.- Parameters:
permission- the permission to add.- Since:
- 1.4.7
-
realClass
-