Class XMLViews

java.lang.Object
com.axelor.meta.loader.XMLViews

public class XMLViews extends Object
  • Method Details

    • unmarshal

      public static ObjectViews unmarshal(InputStream stream) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public static ObjectViews unmarshal(String xml) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • unmarshal

      public static ObjectViews unmarshal(Node node) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • marshal

      public static void marshal(ObjectViews views, Writer writer) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • parseXml

      public static Document parseXml(String xml) throws ParserConfigurationException, SAXException, IOException
      Throws:
      ParserConfigurationException
      SAXException
      IOException
    • isViewType

      public static boolean isViewType(String type)
    • toXml

      public static String toXml(Object obj, boolean strip)
    • fromXML

      public static ObjectViews fromXML(String xml) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • findViews

      public static Map<String,Object> findViews(String model, Map<String,String> views)
    • 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:

      1. find custom view by name and current user
      2. find view matching given params with user's group
      3. find view matching given params but have no groups
      Parameters:
      name - find by name
      type - 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:
    • findAction

      public static Action findAction(String name)