Package hudson.plugins.git
Class RemoteConfigConverter
java.lang.Object
hudson.plugins.git.RemoteConfigConverter
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter
,com.thoughtworks.xstream.converters.ConverterMatcher
public class RemoteConfigConverter
extends Object
implements com.thoughtworks.xstream.converters.Converter
Remote config converter that handles unmarshaling legacy externalization of
JGit RemoteConfig class.
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteConfigConverter
(com.thoughtworks.xstream.XStream xStream) Create remote config converter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canConvert
(Class type) protected boolean
isLegacyNode
(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) Is the current reader node a legacy node?protected Object
legacyUnmarshal
(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) Legacy unmarshalling of remote configvoid
marshal
(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context) unmarshal
(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
Constructor Details
-
RemoteConfigConverter
public RemoteConfigConverter(com.thoughtworks.xstream.XStream xStream) Create remote config converter.- Parameters:
xStream
- XStream used for remote configuration conversion
-
-
Method Details
-
canConvert
- 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
-
isLegacyNode
protected boolean isLegacyNode(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) Is the current reader node a legacy node?- Parameters:
reader
- stream readercontext
- usage context of reader- Returns:
- true if legacy, false otherwise
-
legacyUnmarshal
protected Object legacyUnmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) Legacy unmarshalling of remote config- Parameters:
reader
- stream readercontext
- usage context of reader- Returns:
- remote config
-
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
-