Class RoleBasedAuthorizationStrategy.ConverterImpl
- java.lang.Object
-
- com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy.ConverterImpl
-
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter
,com.thoughtworks.xstream.converters.ConverterMatcher
- Enclosing class:
- RoleBasedAuthorizationStrategy
public static class RoleBasedAuthorizationStrategy.ConverterImpl extends Object implements com.thoughtworks.xstream.converters.Converter
Converter used to persist and retrieve the strategy from disk.This converter is there to manually handle the marshalling/unmarshalling of this strategy: Doing so is a little bit dirty but allows to easily update the plugin when new access controlled object (for the moment: Job and Project) will be introduced. If it's the case, there's only the need to update the getRoleMaps() method.
-
-
Constructor Summary
Constructors Constructor Description ConverterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canConvert(Class type)
protected RoleBasedAuthorizationStrategy
create()
void
marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
Object
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
-
-
Method Detail
-
canConvert
public boolean canConvert(Class type)
- Specified by:
canConvert
in interfacecom.thoughtworks.xstream.converters.ConverterMatcher
-
marshal
public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
- Specified by:
marshal
in interfacecom.thoughtworks.xstream.converters.Converter
-
unmarshal
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
- Specified by:
unmarshal
in interfacecom.thoughtworks.xstream.converters.Converter
-
create
protected RoleBasedAuthorizationStrategy create()
-
-