Package org.eclipse.jst.j2ee.webapplication

Examples of org.eclipse.jst.j2ee.webapplication.ContextParam


          //need to branch here due to model version differences (BugZilla #119442)
          if (webApp.getVersionID() == J2EEVersionConstants.WEB_2_3_ID) {
            EList contexts = webApp.getContexts();
            Iterator itContexts = contexts.iterator();
            while (itContexts.hasNext()) {
              ContextParam contextParam = (ContextParam)itContexts.next();
              if (contextParam.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME)) {
                filesString = contextParam.getParamValue();
                break;
              }
            }
          } else {
            EList contextParams = webApp.getContextParams();
View Full Code Here


    webApp.eAdapters().add(contextParamAdapter);
    EList contexts = webApp.getContexts();
    if (contexts != null) {
      Iterator itContexts = contexts.iterator();
      while (itContexts.hasNext()) {
        ContextParam contextParam = (ContextParam)itContexts.next();
        contextParam.eAdapters().add(contextParamAdapter);
      }
    }
    EList contextParams = webApp.getContextParams();
    if (contextParams != null) {
      Iterator itContextParams = contextParams.iterator();
View Full Code Here

    webApp.eAdapters().remove(contextParamAdapter);
    EList contexts = webApp.getContexts();
    if (contexts != null) {
      Iterator itContexts = contexts.iterator();
      while (itContexts.hasNext()) {
        ContextParam contextParam = (ContextParam)itContexts.next();
        contextParam.eAdapters().remove(contextParamAdapter);
      }
    }
    EList contextParams = webApp.getContextParams();
    if (contextParams != null) {
      Iterator itContextParams = contextParams.iterator();
View Full Code Here

          //need to branch here due to model version differences (BugZilla #119442)
          if (webApp.getVersionID() == J2EEVersionConstants.WEB_2_3_ID) {
            EList contexts = webApp.getContexts();
            Iterator itContexts = contexts.iterator();
            while (itContexts.hasNext()) {
              ContextParam contextParam = (ContextParam)itContexts.next();
              if (contextParam.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME)) {
                filesString = contextParam.getParamValue();
                break;
              }
            }
          } else {
            EList contextParams = webApp.getContextParams();
View Full Code Here

        if ("2.3".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            Iterator it = webApp.getContexts().iterator();
            while (it.hasNext())
            {
                final ContextParam cp = (ContextParam) it.next();
                if (cp.getParamName().equals(paramName))
                {
                    webApp.getContexts().remove(cp);
                    break;
                }
            }
        }
        else if ("2.4".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            Iterator it = webApp.getContextParams().iterator();
            while (it.hasNext())
            {
                ParamValue cp = (ParamValue) it.next();
                if (cp.getName().equals(paramName)) {
                    webApp.getContextParams().remove(cp);
                    break;
                }
            }
        }
View Full Code Here

   * @param paramValue
   */
  public static void setupContextParamForV2_3(final WebApp webApp, String paramName, String paramValue) {
     
    // if not default name and location, then add context param
    ContextParam cp = null;
    ContextParam foundCP = null;
    boolean found = false;
    // check to see if present
    Iterator it = webApp.getContexts().iterator();
    while (it.hasNext()) {
      cp = (ContextParam) it.next();
View Full Code Here

    {
        if ("2.3".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            for (Iterator it = webApp.getContexts().iterator(); it.hasNext();)
            {
                ContextParam cp = (ContextParam) it.next();
          if (cp != null &&
              cp.getParamName() != null &&
              cp.getParamName().trim().equals(paramName)) {
                        return cp.getParamValue();
                }
            }
        }
        else if ("2.4".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            for (Iterator it = webApp.getContextParams().iterator(); it.hasNext();)
            {
                ParamValue cp = (ParamValue) it.next();
          if (cp != null &&
              cp.getName() != null &&
              cp.getName().trim().equals(paramName)) {
                    return cp.getValue();
                }
            }
        }
        return null;
    }
View Full Code Here

        if ("2.3".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            Iterator it = webApp.getContexts().iterator();
            while (it.hasNext())
            {
                final ContextParam cp = (ContextParam) it.next();
                if (cp.getParamName().equals(paramName))
                {
                    webApp.getContexts().remove(cp);
                    break;
                }
            }
        }
        else if ("2.4".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            Iterator it = webApp.getContextParams().iterator();
            while (it.hasNext())
            {
                ParamValue cp = (ParamValue) it.next();
                if (cp.getName().equals(paramName)) {
                    webApp.getContextParams().remove(cp);
                    break;
                }
            }
        }
View Full Code Here

   * @param paramValue
   */
  public static void setupContextParamForV2_3(final WebApp webApp, String paramName, String paramValue) {
     
    // if not default name and location, then add context param
    ContextParam cp = null;
    ContextParam foundCP = null;
    boolean found = false;
    // check to see if present
    Iterator it = webApp.getContexts().iterator();
    while (it.hasNext()) {
      cp = (ContextParam) it.next();
View Full Code Here

    {
        if ("2.3".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            for (Iterator it = webApp.getContexts().iterator(); it.hasNext();)
            {
                ContextParam cp = (ContextParam) it.next();
          if (cp != null &&
              cp.getParamName() != null &&
              cp.getParamName().trim().equals(paramName)) {
                        return cp.getParamValue();
                }
            }
        }
        else if ("2.4".equals(webApp.getVersion())) //$NON-NLS-1$
        {
            for (Iterator it = webApp.getContextParams().iterator(); it.hasNext();)
            {
                ParamValue cp = (ParamValue) it.next();
          if (cp != null &&
              cp.getName() != null &&
              cp.getName().trim().equals(paramName)) {
                    return cp.getValue();
                }
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.j2ee.webapplication.ContextParam

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.