Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigBean


        for(int i=0; i<attrs.length; i++)
        {
            if(!bSkipNullValued || attrs[i].getValue()!=null)
                list.add(attrs[i]);
        }
        ConfigBean bean = mcb.createChildByType(childElementName, list, null, bOnlyOne);
        return ConfigMBeanHelper.getChildObjectName(m_registry, info, bean);
    }
View Full Code Here


        for(int i=0; i<attrs.length; i++)
        {
            if(!bSkipNullValued || attrs[i].getValue()!=null)
                list.add(attrs[i]);
        }
        ConfigBean bean = mcb.createChildByType(childElementName, list, null, bOnlyOne);
        return ConfigMBeanHelper.getChildObjectName(m_registry, info, bean);
    }
View Full Code Here

     */
    public ConfigBean getChildElementByName(String methodName, String namethrows MBeanException,AttributeNotFoundException
    {

        Class cl = m_baseConfigBean.getClass();
        ConfigBean bean;
        try
        {
           Method method = cl.getDeclaredMethod(methodName, new Class[]{Class.forName("java.lang.String")});
           return (ConfigBean)method.invoke(m_baseConfigBean, new Object[]{name});
        }
View Full Code Here

            return getSystemPropertyValue(externalName.substring(SYSTEM_PROPERTY_NAME_PREFIX.length()));
        }
        else
        {
            AttrDescriptor descr = getDescriptor(externalName);
            ConfigBean  bean = getConfigBean(externalName);
            Object value = null;
            if(descr.isElement())
            {
                //it looks that now we have no Elements with values
                //value = descr.getNode().getContent();
                wrapAndThrowMBeanException(null, "getattribute_not_implemented_for_xml", externalName);
            }
            else
            {
                if(ai.getType().startsWith("[")) //array
                {
                    value = invokeMethodOnBean(bean, descr, "getValues");
                }
                else
                {
                    try {
                        value = bean.getAttributeValue(descr.getAttributeName());
                    } catch (IllegalArgumentException e) {
                        // Not actually attribute but an element,
                        // use getValue() to get the String attribute
                        value = invokeMethodOnBean(bean, descr, "getValue");
                    }
View Full Code Here

     @throws AttributeNotFoundException exception
     */
    public ConfigBean getChildElementByName(String methodName, String namethrows MBeanException,AttributeNotFoundException
    {

        ConfigBean baseBean = getBaseConfigBean();
        Class cl = baseBean.getClass();
        ConfigBean bean;
        try
        {
           Method method = cl.getDeclaredMethod(methodName, new Class[]{Class.forName("java.lang.String")});
           return (ConfigBean)method.invoke(baseBean, new Object[]{name});
        }
View Full Code Here

    /****************************************************************************************************************
     */
    public AttributeList getProperties()  throws MBeanException,AttributeNotFoundException {
        _sLogger.log(Level.FINEST, MSG_BASE_GET_PROPERTIES);
       
        ConfigBean baseBean = getBaseConfigBean();
        Class cl = baseBean.getClass();
        ElementProperty[] props = null;
        try {
            Method method = cl.getDeclaredMethod("getElementProperty");
            props = (ElementProperty[])method.invoke(baseBean);
        }
View Full Code Here

     /**
      * get all siblings beans (including this)
      */
     public ConfigBean[] getAllSiblingsForConfigBean(ConfigBean cb)
     {
         ConfigBean parent = (ConfigBean)cb.parent();
         if(parent==null)
             return new ConfigBean[]{cb};
         else
             return parent.getChildBeansByName(cb.name());
     }
View Full Code Here

                ConfigContext newConfig = event.getConfigContext();
                  for (Object change: event.getConfigChangeList()) {
                    if (change instanceof ConfigAdd || change instanceof ConfigUpdate) {
                        String xpath = ((ConfigChange)change).getXPath();
                        if( xpath != null){
                            ConfigBean item = newConfig.exactLookup(xpath);
                            if (item instanceof ElementProperty) {
                                ElementProperty elementProperty = (ElementProperty)item;
                                String name  = elementProperty.getName();
                                String monLevel    = elementProperty.getValue();
                                MonitoringLevel level = MonitoringLevel.instance(monLevel);
View Full Code Here

        if(xpath==null)
            return null;
        String[] elems  = extractTokens(xpath);
        if(elems.length==0 || elems[0].length()!=0)          
           return null;
        ConfigBean cb = null;
        try {
            cb = ctx.getRootConfigBean();
        } catch (ConfigException ce){
        }
        AttributeList list = new AttributeList();
View Full Code Here

    private static ConfigBean[] getNextBeans(ConfigBean cb, String name)
    {
        try{
            if("..".equals(name))
            {
               ConfigBean parent = (ConfigBean)cb.parent();
               if(parent==null)
                   return null;
               ConfigBean grand = (ConfigBean)parent.parent();
               if(grand==null)
                   return new ConfigBean[]{parent};
               return (ConfigBean[])grand.getValue(parent.name());
            }
            return (ConfigBean[])cb.getValues(convertName(name));
        } catch(Throwable t){
            return null;
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.ConfigBean

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.