IDSDataSource.java :  » Portal » Open-Portal » com » sun » portal » rewriter » services » ids » Java Open Source

Java Open Source » Portal » Open Portal 
Open Portal » com » sun » portal » rewriter » services » ids » IDSDataSource.java
package com.sun.portal.rewriter.services.ids;

import com.iplanet.portalserver.gwutils.PropertiesProfile;
import com.sun.portal.rewriter.util.Constants;

import java.util.List;
import java.util.Set;

public final class IDSDataSource implements DataSource
{
    private static final String HTML_APPLET_RULES =
      "AppletParamValues";
    private static final String HTML_FORM_RULES =
      "FormInputValues";
    private static final String HTML_URL_ATTRIBUTE_RULES =
      "Tags";
    private static final String HTML_DJS_ATTRIBUTE_RULES =
      "JavaScriptTags";

    private static final String JS_URL_VARIABLE_RULES =
      "JavaScriptVariables";
    private static final String JS_EXPRESSION_VARIABLE_RULES =
      "JavaScriptVariableConvert";
    private static final String JS_DHTML_VARIABLE_RULES =
      "JavaScriptHTMLVariables";
    private static final String JS_DJS_VARIABLE_RULES =
      "JavaScriptVariableJavaScript";
    private static final String JS_SYSTEM_VARIABLE_RULES =
      "JavaScriptSystemVariableConvert";

    private static final String JS_URL_FUNCTION_RULES =
      "JavaScriptRewrite";
    private static final String JS_EXPRESSION_FUNCTION_RULES =
      "JavaScriptFunctionParameterConvert";
    private static final String JS_DHTML_FUNCTION_RULES =
      "JavaScriptHTML";
    private static final String JS_DJS_FUNCTION_RULES =
      "JavaScriptFunctionParameterJavaScript";

    private static final String XML_URL_ATTRIBUTE_RULES =
      "XMLAttributeRewrite";
    private static final String XML_TAGTEXT_RULES =
      "XMLTextRewrite";

    public String[] getHTMLAppletData()
    {
  final List htmlAppletRules = PropertiesProfile.getAppList( HTML_APPLET_RULES );
  return (String[]) htmlAppletRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getHTMLAppletData()

    public String[] getHTMLFormData()
    {
  final List htmlFORMRules = PropertiesProfile.getAppList( HTML_FORM_RULES );
  return (String[]) htmlFORMRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getHTMLFormData()

    public String[] getHTMLAttributeData()
    {
  final Set htmlURLAttributeRules = PropertiesProfile.getAppHashSet( HTML_URL_ATTRIBUTE_RULES, true );
  return (String[]) htmlURLAttributeRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getHTMLAttributeData()

    public String[] getHTMLJSTokenData()
    {
  final Set htmlDJSAttributeRules = PropertiesProfile.getAppHashSet( HTML_DJS_ATTRIBUTE_RULES, true );
  return (String[]) htmlDJSAttributeRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getHTMLJSTokenData()

    public String[] getJSURLVariablesData()
    {
  final Set jsURLVariableRules = PropertiesProfile.getAppHashSet( JS_URL_VARIABLE_RULES, false );
  return (String[]) jsURLVariableRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSURLVariablesData()

    public String[] getJSExpressionVariablesData()
    {
  final Set jsEXPRESSIONVariableRules = PropertiesProfile.getAppHashSet( JS_EXPRESSION_VARIABLE_RULES, false );
  return (String[]) jsEXPRESSIONVariableRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSExpressionVariablesData()

    public String[] getJSDHTMLVariablesData()
    {
  final Set jsDHTMLVariableRules = PropertiesProfile.getAppHashSet( JS_DHTML_VARIABLE_RULES, false );
  return (String[]) jsDHTMLVariableRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSDHTMLVariablesData()

    public String[] getJSDJSVariablesData()
    {
  final Set jsDJSVariableRules = PropertiesProfile.getAppHashSet( JS_DJS_VARIABLE_RULES, false );
  return (String[]) jsDJSVariableRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSDJSVariablesData()

    public String[] getJSSystemVariablesData()
    {
  final Set jsSYSTEMVariableRules = PropertiesProfile.getAppHashSet( JS_SYSTEM_VARIABLE_RULES, false );
  return (String[]) jsSYSTEMVariableRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSSystemVariablesData()

    public String[] getJSURLFunctionData()
    {
  final List jsURLFunctionRules = PropertiesProfile.getAppList( JS_URL_FUNCTION_RULES );
  return (String[]) jsURLFunctionRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSURLFunctionData()

    public String[] getJSExpressionFunctionData()
    {
  final List jsEXPRESSIONFunctionRules = PropertiesProfile.getAppList( JS_EXPRESSION_FUNCTION_RULES );
  return (String[]) jsEXPRESSIONFunctionRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSExpressionFunctionData()

    public String[] getJSDHTMLFunctionData()
    {
  final List jsDHTMLFunctionRules = PropertiesProfile.getAppList( JS_DHTML_FUNCTION_RULES );
  return (String[]) jsDHTMLFunctionRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSDHTMLFunctionData()

    public String[] getJSDJSFunctionData()
    {
  final List jsDJSFunctionRules = PropertiesProfile.getAppList( JS_DJS_FUNCTION_RULES );
  return (String[]) jsDJSFunctionRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getJSDJSFunctionData()

    public String[] getXMLAttributeData()
    {
  final List xmlURLAttributeRules = PropertiesProfile.getAppList( XML_URL_ATTRIBUTE_RULES );
  return (String[]) xmlURLAttributeRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getXMLAttributeData()

    public String[] getXMLTagTextData()
    {
  final List xmlURLAttributeRules = PropertiesProfile.getAppList( XML_TAGTEXT_RULES );
  return (String[]) xmlURLAttributeRules.toArray( Constants.EMPTY_STRING_ARRAY );
    }//getXMLTagTextData()

}//class IDSDataSource

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.