Package com.saperion.ngc.favorites
Enum FavoriteXmlHandler
- java.lang.Object
-
- java.lang.Enum<FavoriteXmlHandler>
-
- com.saperion.ngc.favorites.FavoriteXmlHandler
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FavoriteXmlHandler>
public enum FavoriteXmlHandler extends java.lang.Enum<FavoriteXmlHandler>
XML Handler to perform xml to java binding.- Author:
- mak
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
singleton instance.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FAVORITES_XML
favorites xml file name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.saperion.ngc.favorites.xml.Favorites
getAdaptedFavorites(java.io.InputStream stream)
Converts the given favorites xml stream to java binding and adds additional information (converts the string data to the real data types).java.lang.String
marshal(com.saperion.ngc.favorites.xml.Favorites favorites)
Converts the given favorites java object to xml binding.com.saperion.rmi.SaContentStream
marshalToStream(com.saperion.ngc.favorites.xml.Favorites favorites)
Converts the given favorites java object to xml binding.com.saperion.ngc.favorites.xml.Favorites
unmarshal(java.io.InputStream stream)
Converts the given favorites xml stream to java binding.com.saperion.ngc.favorites.xml.Favorites
unmarshal(java.lang.String xml)
Converts the given favorites xml string to java binding.static FavoriteXmlHandler
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FavoriteXmlHandler[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final FavoriteXmlHandler INSTANCE
singleton instance.
-
-
Field Detail
-
FAVORITES_XML
public static final java.lang.String FAVORITES_XML
favorites xml file name.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static FavoriteXmlHandler[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FavoriteXmlHandler c : FavoriteXmlHandler.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FavoriteXmlHandler valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
unmarshal
public com.saperion.ngc.favorites.xml.Favorites unmarshal(java.lang.String xml) throws javax.xml.bind.JAXBException
Converts the given favorites xml string to java binding.- Parameters:
xml
- the favorites xml string- Returns:
Favorites
element root- Throws:
javax.xml.bind.JAXBException
- JAXBException
-
unmarshal
public com.saperion.ngc.favorites.xml.Favorites unmarshal(java.io.InputStream stream) throws javax.xml.bind.JAXBException
Converts the given favorites xml stream to java binding.- Parameters:
stream
- the favorites xml stream- Returns:
Favorites
element root- Throws:
javax.xml.bind.JAXBException
- JAXBException
-
getAdaptedFavorites
public com.saperion.ngc.favorites.xml.Favorites getAdaptedFavorites(java.io.InputStream stream) throws javax.xml.bind.JAXBException, FavoriteReadException
Converts the given favorites xml stream to java binding and adds additional information (converts the string data to the real data types).- Parameters:
stream
- the favorites xml stream- Returns:
Favorites
element root- Throws:
javax.xml.bind.JAXBException
- JAXBExceptionFavoriteReadException
- favorite settings could not be read
-
marshal
public java.lang.String marshal(com.saperion.ngc.favorites.xml.Favorites favorites) throws javax.xml.bind.JAXBException
Converts the given favorites java object to xml binding.- Parameters:
favorites
-Favorites
element root- Returns:
- the favorites xml string
- Throws:
javax.xml.bind.JAXBException
- JAXBException
-
marshalToStream
public com.saperion.rmi.SaContentStream marshalToStream(com.saperion.ngc.favorites.xml.Favorites favorites) throws javax.xml.bind.JAXBException
Converts the given favorites java object to xml binding.- Parameters:
favorites
-Favorites
element root- Returns:
- the favorites file content stream
- Throws:
javax.xml.bind.JAXBException
- JAXBException
-
-