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 Action
findAction(String name)
static AbstractView
findCustomView(Long id)
static AbstractView
findView(Long id)
static AbstractView
findView(String name, String type)
static AbstractView
findView(String name, String type, String model)
static AbstractView
findView(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 ObjectViews
fromXML(String xml)
static boolean
isCustomizationEnabled()
static boolean
isViewType(String type)
static void
marshal(ObjectViews views, Writer writer)
static Document
parseXml(String xml)
static String
toXml(Object obj, boolean strip)
static ObjectViews
unmarshal(InputStream stream)
static ObjectViews
unmarshal(String xml)
static ObjectViews
unmarshal(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:
-
-