Package com.axelor.meta.loader
Class XMLViews
- java.lang.Object
-
- com.axelor.meta.loader.XMLViews
-
public class XMLViews extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ActionfindAction(String name)static AbstractViewfindCustomView(Long id)static AbstractViewfindView(Long id)static AbstractViewfindView(String name, String type)static AbstractViewfindView(String name, String type, String model)static AbstractViewfindView(String name, String type, String model, String module)Find view by the given parameters.static Map<String,Object>findViews(String model, Map<String,String> views)static ObjectViewsfromXML(String xml)static booleanisCustomizationEnabled()static booleanisViewType(String type)static voidmarshal(ObjectViews views, Writer writer)static DocumentparseXml(String xml)static StringtoXml(Object obj, boolean strip)static ObjectViewsunmarshal(InputStream stream)static ObjectViewsunmarshal(String xml)static ObjectViewsunmarshal(Node node)
-
-
-
Method Detail
-
unmarshal
public static ObjectViews unmarshal(InputStream stream) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
public static ObjectViews unmarshal(String xml) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
unmarshal
public static ObjectViews unmarshal(Node node) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
marshal
public static void marshal(ObjectViews views, Writer writer) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
parseXml
public static Document parseXml(String xml) throws ParserConfigurationException, SAXException, IOException
-
isViewType
public static boolean isViewType(String type)
-
fromXML
public static ObjectViews fromXML(String xml) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
findView
public static AbstractView findView(Long id)
-
findCustomView
public static AbstractView findCustomView(Long id)
-
findView
public static AbstractView findView(String name, String type)
-
findView
public static AbstractView findView(String name, String type, String model)
-
isCustomizationEnabled
public static boolean isCustomizationEnabled()
-
findView
public static AbstractView findView(String name, String type, String model, String module)
Find view by the given parameters.This method will find view in following order:
- find custom view by name and current user
- find view matching given params with user's group
- find view matching given params but have no groups
- Parameters:
name- find by nametype- find by type (name or model should be provided)model- find by model (name or type should be provided)module- (any of the other param should be provided)- Returns:
-
-