Examples of ElementProperty


Examples of com.sun.enterprise.config.serverbeans.ElementProperty

     *
     * @return true if access logging is enabled for this virtual server,
     * false otherwise.
     */
    boolean isAccessLoggingEnabled(boolean globalAccessLoggingEnabled) {
        ElementProperty prop  =
            vsBean.getElementPropertyByName(Constants.ACCESS_LOGGING_ENABLED);

        if (prop == null || prop.getValue() == null) {
            return globalAccessLoggingEnabled;
        } else {
            return ConfigBean.toBoolean(prop.getValue());
        }
    }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

     */
    void configureErrorReportValve() {
        if (vsBean == null) {
            return;
        }
        ElementProperty prop = vsBean.getElementPropertyByName(
            Constants.ERROR_REPORT_VALVE);
        if (prop != null) {
            setErrorReportValveClass(prop.getValue());
        }
    }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

        ElementProperty[] eProp = em.getElementProperty();
        if (eProp.length != 0) {
          // return a non-null result
          result = new Properties();
          for(int j=0; j<eProp.length; j++) {
            ElementProperty eProp1 = eProp[j];
            result.put(eProp1.getName(), eProp1.getValue());
          }
        }
      } catch (Throwable e) {
        _logger.log(Level.WARNING, "could not determine properties for AR module",e);
        result = null;
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

        // Next, make properties of this jacc provider available to provider

        int propCount = jacc.sizeElementProperty();
        for (int i=0; i<propCount; i++) {

            ElementProperty p = jacc.getElementProperty(i);
            String name = POLICY_PROP_PREFIX + p.getName();
            String value = p.getValue();
            _logger.finest("PolicyLoader set ["+name+"] to ["+value+"]");
            System.setProperty(name, value);
        }

    }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

        if (vsBean != null) {

            state = vsBean.getState();

            ElementProperty prop = null;

            //Begin EE: 4920692 Make the default-web.xml be relocatable
            prop = vsBean.getElementPropertyByName("default-web-xml");
            if (prop != null) {
                defaultWebXmlLocation = prop.getValue();
            }
            //End EE: 4920692 Make the default-web.xml be relocatable

            // allowLinking
            prop = vsBean.getElementPropertyByName("allowLinking");
            if (prop != null) {
                allowLinking = ConfigBean.toBoolean(prop.getValue());
            }

            prop = vsBean.getElementPropertyByName("contextXmlDefault");
            if (prop != null) {
                defaultContextXmlLocation = prop.getValue();
            }

        }

        vs.setDefaultWebXmlLocation(defaultWebXmlLocation);
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

    }

    public static void setPropertyOnAppBean(ConfigBean appBean,
        DeploymentRequest request) throws ConfigException {
        if (request.isExternallyManagedApp()) {
            ElementProperty extManagedProperty = new ElementProperty();
            extManagedProperty.setName(EXTERNALLY_MANAGED);
            extManagedProperty.setValue("true");
            if (appBean instanceof J2eeApplication) {
                J2eeApplication app = (J2eeApplication) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof EjbModule) {
                EjbModule app = (EjbModule) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof WebModule) {
                WebModule app = (WebModule) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof AppclientModule) {
                AppclientModule app = (AppclientModule) appBean;
                app.addElementProperty(extManagedProperty);
            } else if (appBean instanceof ConnectorModule) {
                ConnectorModule app = (ConnectorModule) appBean;
                app.addElementProperty(extManagedProperty);
            }
        }
       
        // Set the context root on the extension module as a property
        if(appBean instanceof ExtensionModule) {
           
            ExtensionModule extApp = (ExtensionModule) appBean;
           
            ElementProperty isConvergedProperty = new ElementProperty();
            isConvergedProperty.setName(IS_CONVERGED);
           
            ElementProperty contextRootProperty = new ElementProperty();
            contextRootProperty.setName(CONTEXT_ROOT);
           
            Properties props = request.getOptionalArguments();

            /*
             * The (name=value)[:name=value]* of the property option is
             * converted to ElementProperty here.
             */
            Map<String, String> propMap = (Map) props.get("property");
            if(propMap != null) {
                ArrayList list = new ArrayList();
                for (Iterator<String> itr = propMap.keySet().iterator(); itr.hasNext();) {
                    String key = itr.next();
                    ElementProperty property = new ElementProperty();
                    property.setName(key);
                    property.setValue(propMap.get(key));
                    list.add(property);
                }

                ElementProperty[] eProp = (ElementProperty[]) list.toArray(new ElementProperty[list.size()]);
                extApp.setElementProperty(eProp);
            }

            String value = props.getProperty("isConverged");
            if(value != null ) {
                if("true".equals(value)) {
                    isConvergedProperty.setValue("true");
                    // Check if context root is explictily set
                    if(request.getContextRoot() != null) {
                        contextRootProperty.setValue(request.getContextRoot());
                    } else {
                        contextRootProperty.setValue(
                            request.getDefaultContextRoot());
                    }
                    if(extApp.getElementPropertyByName("isConverged") != null ) {
                        extApp.removeElementProperty(
                               extApp.getElementPropertyByName("isConverged"));
                    }
                    if(extApp.getElementPropertyByName("contextRoot") != null) {
                         extApp.removeElementProperty(
                                extApp.getElementPropertyByName("contextRoot"));
                    }
                    extApp.addElementProperty(isConvergedProperty, true);
                    extApp.addElementProperty(contextRootProperty, true );
                } else {
                    isConvergedProperty.setValue("false");
                    if(extApp.getElementPropertyByName("isConverged") != null ) {
                        extApp.removeElementProperty(
                            extApp.getElementPropertyByName("isConverged"));
                    }
                    extApp.addElementProperty(isConvergedProperty);               
                }
            }
        }
       
        // now see if there is a property added for j2ee-applications
        if(appBean instanceof J2eeApplication) {
            Properties props = request.getOptionalArguments();
            if(props.containsKey("isConverged")) {
                ElementProperty isConvergedAppProp = new ElementProperty();
                isConvergedAppProp.setName(IS_CONVERGED);
                isConvergedAppProp.setValue("true");
                if(((J2eeApplication)appBean).getElementPropertyByName("isConverged") != null ) {
                        ((J2eeApplication)appBean).removeElementProperty(
                            ((J2eeApplication)appBean).getElementPropertyByName("isConverged"));
                }
           
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

    public static boolean isExternallyManagedApp(String appName,
        DeployableObjectType type) throws IASDeploymentException {
        try {
            ConfigBean appBean = getModule(appName, type);
            if (appBean != null) {
                ElementProperty extManagedProperty = null;
                if (appBean instanceof J2eeApplication) {
                    J2eeApplication app = (J2eeApplication) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof EjbModule) {
                    EjbModule app = (EjbModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof WebModule) {
                    WebModule app = (WebModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof AppclientModule) {
                    AppclientModule app = (AppclientModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                } else if (appBean instanceof ConnectorModule) {
                    ConnectorModule app = (ConnectorModule) appBean;
                    extManagedProperty =
                        app.getElementPropertyByName(EXTERNALLY_MANAGED);
                }
                                                                               
                if (extManagedProperty != null) {
                    return Boolean.valueOf(
                        extManagedProperty.getValue()).booleanValue();
                } else {
                    return false;
                }
            } else {
                return false;
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

        if ( elemProps == null ) {
            return false;
        }

        for( int i =0; i < elemProps.length; i++ ) {
            ElementProperty ep = elemProps[i];
            if (ep.getName().equalsIgnoreCase("UserName") ||
                ep.getName().equalsIgnoreCase("User") ||
                ep.getName().equalsIgnoreCase("Password")) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

        if( properties == null ) return;
        Method[] methods = null;
        try {
            methods = getDeclaredMethods( o.getClass( ) );
            for( int i = 0; i < properties.length; i++ ) {
                ElementProperty property = properties[i];
                String propertyName = property.getName( ).toLowerCase( );
                String propertyValue = property.getValue( );
                for( int j = 0; j < methods.length; j++ ) {
                    String methodName = methods[j].getName().toLowerCase();
                    if ( ( methodName.startsWith( "set" ) )
                       && ( methodName.endsWith( propertyName ) ) )
                    {
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ElementProperty

        if( properties == null ) return;
        Method[] methods = null;
        try {
            methods = getDeclaredMethods( o.getClass( ) );
            for( int i = 0; i < properties.length; i++ ) {
                ElementProperty property = properties[i];
                String propertyName = property.getName( ).toLowerCase( );
                String propertyValue = property.getValue( );
                for( int j = 0; j < methods.length; j++ ) {
                    String methodName = methods[j].getName().toLowerCase();
                    if ( ( methodName.startsWith( "set" ) )
                       && ( methodName.endsWith( propertyName ) ) )
                    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.