Package com.saperion.ngc.favorites
Enum Class FavoriteXmlHandler
- All Implemented Interfaces:
Serializable
,Comparable<FavoriteXmlHandler>
,Constable
XML Handler to perform xml to java binding.
- Author:
- mak
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncom.saperion.ngc.favorites.xml.Favorites
getAdaptedFavorites
(InputStream stream) Converts the given favorites xml stream to java binding and adds additional information (converts the string data to the real data types).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
(InputStream stream) Converts the given favorites xml stream to java binding.com.saperion.ngc.favorites.xml.Favorites
Converts the given favorites xml string to java binding.static FavoriteXmlHandler
Returns the enum constant of this class with the specified name.static FavoriteXmlHandler[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
singleton instance.
-
-
Field Details
-
FAVORITES_XML
favorites xml file name.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
unmarshal
public com.saperion.ngc.favorites.xml.Favorites unmarshal(String xml) throws jakarta.xml.bind.JAXBException Converts the given favorites xml string to java binding.- Parameters:
xml
- the favorites xml string- Returns:
Favorites
element root- Throws:
jakarta.xml.bind.JAXBException
- JAXBException
-
unmarshal
public com.saperion.ngc.favorites.xml.Favorites unmarshal(InputStream stream) throws jakarta.xml.bind.JAXBException Converts the given favorites xml stream to java binding.- Parameters:
stream
- the favorites xml stream- Returns:
Favorites
element root- Throws:
jakarta.xml.bind.JAXBException
- JAXBException
-
getAdaptedFavorites
public com.saperion.ngc.favorites.xml.Favorites getAdaptedFavorites(InputStream stream) throws jakarta.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:
jakarta.xml.bind.JAXBException
- JAXBExceptionFavoriteReadException
- favorite settings could not be read
-
marshal
public String marshal(com.saperion.ngc.favorites.xml.Favorites favorites) throws jakarta.xml.bind.JAXBException Converts the given favorites java object to xml binding.- Parameters:
favorites
-Favorites
element root- Returns:
- the favorites xml string
- Throws:
jakarta.xml.bind.JAXBException
- JAXBException
-
marshalToStream
public com.saperion.rmi.SaContentStream marshalToStream(com.saperion.ngc.favorites.xml.Favorites favorites) throws jakarta.xml.bind.JAXBException Converts the given favorites java object to xml binding.- Parameters:
favorites
-Favorites
element root- Returns:
- the favorites file content stream
- Throws:
jakarta.xml.bind.JAXBException
- JAXBException
-