Class PropertyXMLBuilderBase

    • Field Detail

      • debug

        public static Debug debug
      • mapSchemaTypeToName

        protected static Map mapSchemaTypeToName
      • orderDisplaySchemaType

        protected static List orderDisplaySchemaType
      • mapUITypeToName

        protected static Map mapUITypeToName
      • mapTypeToName

        protected static Map mapTypeToName
      • mapSyntaxToName

        protected static Map mapSyntaxToName
      • supportSubConfig

        protected boolean supportSubConfig
      • viewBeanName

        protected String viewBeanName
      • mapTypeToAttributeSchema

        protected Map mapTypeToAttributeSchema
      • serviceName

        protected String serviceName
      • allAttributesReadonly

        protected boolean allAttributesReadonly
      • currentRealm

        protected String currentRealm
    • Constructor Detail

      • PropertyXMLBuilderBase

        public PropertyXMLBuilderBase()
    • Method Detail

      • filterHiddenAttributes

        public static void filterHiddenAttributes​(Set attributeSchemas)
        Removes hidden attribute schemas.
        Parameters:
        attributeSchemas - Set of Attribute Schemas.
      • removeAttributeSchemaWithoutI18nKey

        public static void removeAttributeSchemaWithoutI18nKey​(Set attributeSchemas)
        Removes attribute schema that does not have i18nKey.
        Parameters:
        attributeSchemas - Set of Attribute Schemas.
      • filterAttributes

        public static void filterAttributes​(Set attributeSchemas,
                                            String[] a)
        Removes the attributes that do not match a specified set of any display strings.
        Parameters:
        attributeSchemas - Set of Attribute Schemas.
      • hasAnyAttribute

        public static boolean hasAnyAttribute​(String any,
                                              String attribute)
      • swapXMLProperty

        public static String swapXMLProperty​(String xml,
                                             String propertyName,
                                             String propertyXML)
        Returns a replaced XML. This method replaces a property element.
        Parameters:
        xml - XML to operate on.
        propertyName - Name of the property (attribute) that is going to be replaced.
        propertyXML - XML to replace.
        Returns:
        a replaced XML.
      • insertXML

        public static String insertXML​(String xml,
                                       String insertXML,
                                       String marker,
                                       boolean afterMarker)
        Inserts XML to a property XML.
        Parameters:
        xml - Original property XML.
        insertXML - XML to be inserted to xml.
        marker - A marker where insertXML will be inserted.
        afterMarker - true to insert XML after marker.
        Returns:
        the modified XML.
      • insertXML

        public static String insertXML​(String xml,
                                       String insertXML,
                                       String marker)
        Inserts XML to a property XML.
        Parameters:
        xml - Original property XML.
        insertXML - XML to be inserted to xml.
        marker - A marker where insertXML will be inserted.
        Returns:
        the modified XML.
      • isSubConfigSupported

        public boolean isSubConfigSupported()
        Returns true if sub configuration is supported.
        Returns:
        true if sub configuration is supported.
      • setSupportSubConfig

        public void setSupportSubConfig​(boolean state)
        Set support sub configuration state.
        Parameters:
        state - true to support sub configuration.
      • setViewBeanName

        public void setViewBeanName​(String name)
        Set name of view bean.
        Parameters:
        name - Name of view bean.
      • getViewBeanName

        public String getViewBeanName()
        Returns name of view bean.
        Returns:
        Name of view bean.
      • getServiceResourceBundle

        protected void getServiceResourceBundle()
      • getAttributeSchemas

        public Set getAttributeSchemas()
        Returns a set of attributeSchemas that are displayed.
        Returns:
        Set of attribute names that are displayed.
      • getServiceResourceBundle

        protected void getServiceResourceBundle​(ServiceSchema ss)
      • escapeSpecialChars

        public String escapeSpecialChars​(String text)
      • getMultipleChoiceCheck

        public static String getMultipleChoiceCheck​(String attrName,
                                                    Set choices)
      • setCurrentRealm

        protected void setCurrentRealm​(String value)
      • getCurrentRealm

        protected String getCurrentRealm()
      • prependXMLProperty

        public static String prependXMLProperty​(String xml,
                                                String propertyXML)
        Returns an altered XML. This method prepends a property element.
        Parameters:
        xml - XML to operate on.
        propertyXML - XML to replace.
        Returns:
        the altered XML.
      • appendXMLProperty

        public static String appendXMLProperty​(String xml,
                                               String propertyXML)
        Returns an altered XML. This method appends a property element.
        Parameters:
        xml - XML to operate on.
        propertyXML - XML to replace.
        Returns:
        the altered XML.
      • getServiceSchemaManager

        public ServiceSchemaManager getServiceSchemaManager()
        Returns service schema manager.
        Returns:
        service schema manager.
      • buildSchemaTypeXML

        protected void buildSchemaTypeXML​(String schemaTypeName,
                                          Set attributeSchemas,
                                          StringBuffer xml,
                                          AMModel model,
                                          ResourceBundle serviceBundle,
                                          Set readonly,
                                          boolean section,
                                          boolean addSubSection)
      • formPropertySheetXML

        public static String formPropertySheetXML​(String properties)
        Returns a property XML of a given well formed attributes XML string.
        Parameters:
        properties - Well formed attributes XML string..
        Returns:
        a property XML of a given well formed attributes XML string.
      • formPropertySheetXML

        public static String formPropertySheetXML​(String properties,
                                                  boolean addSection)
        Returns a property XML of a given well formed attributes XML string.
        Parameters:
        properties - Well formed attributes XML string..
        addSection - true to add a dummy section to the XML.
        Returns:
        a property XML of a given well formed attributes XML string.
      • setAllAttributeReadOnly

        public void setAllAttributeReadOnly​(boolean flag)
        Set all all attribute values read only.
        Parameters:
        flag - true if all attribute values are read only.
      • getAttributeNameForPropertyXML

        protected String getAttributeNameForPropertyXML​(AttributeSchema as)
      • tagSwap

        protected String tagSwap​(String template,
                                 String tag,
                                 String value)
        Performs a tag substitution on a string.
        Parameters:
        template - Template for tag swapping.
        tag - Tag.
        value - Value of Tag.
      • getXMLDefinitionHeader

        public static String getXMLDefinitionHeader()