Package org.jboss.managed.api

Examples of org.jboss.managed.api.ManagedParameter


            foundNoArgOperation = true;
         }
         else
         {
            assertEquals("Unexpected number of parameters", 1, parameters.length);
            ManagedParameter parameter = parameters[0];
            assertEquals("Invalid parameter name", "securityDomainName", parameter.getName());
            assertEquals("Invalid parameter type", "java.lang.String", parameter.getMetaType().getTypeName());
            foundStringArgOperation = true;
         }
      }
      assertTrue(foundNoArgOperation);
      assertTrue(foundStringArgOperation);
View Full Code Here


            ManagedParameter[] params = op.getParameters();
            if(params != null &&  params.length == param.length)
            {
               for(int i=0; i < param.length; i++)
               {
                  ManagedParameter mp = params[i];
                  MetaMapper<?> mapper = mp.getTransientAttachment(MetaMapper.class);
                  if(mapper != null)
                     args[i] = mapper.unwrapMetaValue(param[i]);
                  else
                     args[i] = unwrap(param[i]);
                  //
                  sig[i] = mp.getMetaType().getTypeName();
               }
            }
            else
            {
               args = toArguments(param);
View Full Code Here

            ManagedParameter[] params = op.getParameters();
            if(params != null &&  params.length == param.length)
            {
               for(int i=0; i < param.length; i++)
               {
                  ManagedParameter mp = params[i];
                  MetaMapper<?> mapper = mp.getTransientAttachment(MetaMapper.class);
                  if(mapper != null)
                     args[i] = mapper.unwrapMetaValue(param[i]);
                  else
                     args[i] = unwrap(param[i]);
                  //
                  sig[i] = mp.getMetaType().getTypeName();
               }              
            }
            else
            {
               args = toArguments(param);
View Full Code Here

            return new MetaValue[0];
        ManagedParameter[] managedParams = managedOperation.getParameters(); // this is guaranteed to be non-null
        Map<String, PropertyDefinition> paramPropDefs = paramsConfigDef.getPropertyDefinitions();
        MetaValue[] paramMetaValues = new MetaValue[managedParams.length];
        for (int i = 0; i < managedParams.length; i++) {
            ManagedParameter managedParam = managedParams[i];
            String paramName = managedParam.getName();
            Property paramProp = parameters.get(paramName);
            PropertyDefinition paramPropDef = paramPropDefs.get(paramName);
            MetaType metaType = managedParam.getMetaType();
            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(metaType);
            LOG.trace("Converting RHQ operation param property " + paramProp + " with definition " + paramPropDef
                + " to MetaValue of type " + metaType + "...");
            MetaValue paramMetaValue = propertyAdapter.convertToMetaValue(paramProp, paramPropDef, metaType);
            // NOTE: There's no need to set the value on the ManagedParameter, since the invoke() API takes an array of
View Full Code Here

            foundNoArgOperation = true;
         }
         else
         {
            assertEquals("Unexpected number of parameters", 1, parameters.length);
            ManagedParameter parameter = parameters[0];
            assertEquals("Invalid parameter name", "securityDomainName", parameter.getName());
            assertEquals("Invalid parameter type", "java.lang.String", parameter.getMetaType().getTypeName());
            foundStringArgOperation = true;
         }
      }
      assertTrue(foundNoArgOperation);
      assertTrue(foundStringArgOperation);
View Full Code Here

                  continue;

               boolean sigMatches = true;
               for(int n = 0; n < sigLength; n ++)
               {
                  ManagedParameter mp = params[n];
                  MetaType mps = mp.getMetaType();
                  MetaType sig = signature[n];
                  if(mps.equals(sig) == false)
                  {
                     sigMatches = false;
                     break;
View Full Code Here

      if (obj == this)
         return true;
      if (obj == null || obj instanceof ManagedParameter == false)
         return false;
     
      ManagedParameter other = (ManagedParameter) obj;
      return getName().equals(other.getName());
   }
View Full Code Here

      if (obj == this)
         return true;
      if (obj == null || obj instanceof ManagedParameter == false)
         return false;
     
      ManagedParameter other = (ManagedParameter) obj;
      return getName().equals(other.getName());
   }
View Full Code Here

      if (obj == this)
         return true;
      if (obj == null || obj instanceof ManagedParameter == false)
         return false;
     
      ManagedParameter other = (ManagedParameter) obj;
      return getName().equals(other.getName());
   }
View Full Code Here

/* 258 */     if (obj == this)
/* 259 */       return true;
/* 260 */     if ((obj == null) || (!(obj instanceof ManagedParameter))) {
/* 261 */       return false;
/*     */     }
/* 263 */     ManagedParameter other = (ManagedParameter)obj;
/* 264 */     return getName().equals(other.getName());
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.managed.api.ManagedParameter

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.