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 SummaryEnum Constants Enum Constant Description INSTANCEsingleton instance.
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringFAVORITES_XMLfavorites xml file name.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.saperion.ngc.favorites.xml.FavoritesgetAdaptedFavorites(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.Stringmarshal(com.saperion.ngc.favorites.xml.Favorites favorites)Converts the given favorites java object to xml binding.com.saperion.rmi.SaContentStreammarshalToStream(com.saperion.ngc.favorites.xml.Favorites favorites)Converts the given favorites java object to xml binding.com.saperion.ngc.favorites.xml.Favoritesunmarshal(java.io.InputStream stream)Converts the given favorites xml stream to java binding.com.saperion.ngc.favorites.xml.Favoritesunmarshal(java.lang.String xml)Converts the given favorites xml string to java binding.static FavoriteXmlHandlervalueOf(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- 
INSTANCEpublic static final FavoriteXmlHandler INSTANCE singleton instance.
 
- 
 - 
Field Detail- 
FAVORITES_XMLpublic static final java.lang.String FAVORITES_XML favorites xml file name.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
valuespublic 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
 
 - 
valueOfpublic 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 name
- java.lang.NullPointerException- if the argument is null
 
 - 
unmarshalpublic com.saperion.ngc.favorites.xml.Favorites unmarshal(java.lang.String xml) throws javax.xml.bind.JAXBExceptionConverts the given favorites xml string to java binding.- Parameters:
- xml- the favorites xml string
- Returns:
- Favoriteselement root
- Throws:
- javax.xml.bind.JAXBException- JAXBException
 
 - 
unmarshalpublic com.saperion.ngc.favorites.xml.Favorites unmarshal(java.io.InputStream stream) throws javax.xml.bind.JAXBExceptionConverts the given favorites xml stream to java binding.- Parameters:
- stream- the favorites xml stream
- Returns:
- Favoriteselement root
- Throws:
- javax.xml.bind.JAXBException- JAXBException
 
 - 
getAdaptedFavoritespublic com.saperion.ngc.favorites.xml.Favorites getAdaptedFavorites(java.io.InputStream stream) throws javax.xml.bind.JAXBException, FavoriteReadExceptionConverts 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:
- Favoriteselement root
- Throws:
- javax.xml.bind.JAXBException- JAXBException
- FavoriteReadException- favorite settings could not be read
 
 - 
marshalpublic java.lang.String marshal(com.saperion.ngc.favorites.xml.Favorites favorites) throws javax.xml.bind.JAXBExceptionConverts the given favorites java object to xml binding.- Parameters:
- favorites-- Favoriteselement root
- Returns:
- the favorites xml string
- Throws:
- javax.xml.bind.JAXBException- JAXBException
 
 - 
marshalToStreampublic com.saperion.rmi.SaContentStream marshalToStream(com.saperion.ngc.favorites.xml.Favorites favorites) throws javax.xml.bind.JAXBExceptionConverts the given favorites java object to xml binding.- Parameters:
- favorites-- Favoriteselement root
- Returns:
- the favorites file content stream
- Throws:
- javax.xml.bind.JAXBException- JAXBException
 
 
- 
 
-