Package org.pegasus.jmpi

Examples of org.pegasus.jmpi.CIMObjectPath


        Iterator it=policyNames.iterator();
        Vector instances=new Vector();
        while(it.hasNext())
        {
          String pi=(String)it.next();
          CIMObjectPath cimInst=_createPolicyObjectPath(pi);
          instances.add(cimInst);
        }
        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+"enumerateInstanceNames");
        return instances;
      }
View Full Code Here


              Iterator it=arrayCop.iterator();
              while(it.hasNext())
              {
                arrayOfInstancesParamSizeGreaterThanZero=true;
                CIMObjectPath copI=(CIMObjectPath)it.next();
                String objectName=copI.getObjectName();

                //InstanceInfo iI=new InstanceInfo(objectName,copI);

                //List instanceInfoList = new ArrayList();
                //instanceInfoList.add(iI);

                objMap.put(objectName, copI);

                Integer retVal=(Integer)_policyManager.evaluatePolicy(policyRuleName,objMap);
                if (logger.isLoggable(Level.FINE))
                  logger.fine(Thread.currentThread().getName()+" return value is = "+retVal);

                objMap.remove(objectName);

                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+"invokeMethod");
              }

            }
           
            break;

          }

        }

      }
      if( !inparamsIsNotNull || !inparamsLengthGreaterThanZero || !arrayOfInstancesParamFound ||
          !arrayOfInstancesParamSizeGreaterThanZero)
      {
       
        logger.fine(Thread.currentThread().getName() + "no instances passed evaluating against all");
       
        PolicyInfo policyInfo=this._policyManager.getPolicyInfo(policyRuleName);
       
        Map classQuaifierMap=policyInfo.getClassQualifierMap();
        Iterator classit=classQuaifierMap.keySet().iterator();
       
        if(classQuaifierMap.size()==0 || classQuaifierMap.size()>1)
        {
          logger.severe(Thread.currentThread().getName() + "Multiple Import classes not supported in CIM-SPL");
        }
        while(classit.hasNext())
        {
          String className=(String)classit.next();
          String nameSpace=(String)classQuaifierMap.get(className);
          CIMObjectPath classCop=new CIMObjectPath(className,nameSpace);
          Enumeration copEnum=_handle.enumerateInstanceNames(classCop);
          while(copEnum.hasMoreElements())
          {

            CIMObjectPath copI=(CIMObjectPath)copEnum.nextElement();
            logger.fine(Thread.currentThread().getName() + "instance objectpath= "+copI.toString());

            String objectName=copI.getObjectName();

            if(objectName.equalsIgnoreCase(className))
            {
//              InstanceInfo iI=new InstanceInfo(objectName,copI);
//
View Full Code Here

    if (policyRuleName != null)
    {
      if (logger.isLoggable(Level.FINE))
        logger.fine(Thread.currentThread().getName()+" create a CIMObjectPath using the PolicyRuleName");
      // create a CIMObjectPath using the PolicyRuleName
      CIMObjectPath cop = new CIMObjectPath(POLICY_CLASS_NAME, NAMESPACE);
      cop.addKey("SystemName", new CIMValue("localhost.localdomain"));
      cop.addKey("CreationClassName", new CIMValue(POLICY_CLASS_NAME));
      cop.addKey("PolicyRuleName", new CIMValue(policyRuleName));
      logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "_createPolicyObjectPath");
      return cop;

    }
    else
View Full Code Here

      {
    logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "invokeMethod");

    Vector inParams=new Vector();
    Vector outParams=new Vector();
    CIMObjectPath cop=new CIMObjectPath(className,namespace);

    if(className!=null && namespace!=null)
    {
      try
      {

        Iterator it=inParameterValues.iterator();
        Map cimArgNameValuePairs= new HashMap();
        while(it.hasNext())
        {
          Argument arg=(Argument)it.next();
          cimArgNameValuePairs.put(arg.getName(), arg.getValue());
          //System.out.println(" added to cimArgNameValuePairs : "+arg.getName()+ " "+arg.getValue().toString());
        }

        if(instance instanceof CIMObjectPath)
        {
          cop=(CIMObjectPath)instance;
          CIMObjectPath classCop=new CIMObjectPath(className,namespace);
          CIMClass cimclass=handle.getClass(classCop, true, true, true, null);

          CIMMethod cimMethod= cimclass.getMethod(methodName);
          inParams=getMethodInputParams(cimMethod, cimArgNameValuePairs);
          if(logger.isLoggable(Level.FINE))
            logger.fine(Thread.currentThread().getName()+" Actuator::invokeMethod:invoking method "+methodName);

          CIMObjectPath instanceCop=new CIMObjectPath(className,namespace);
          instanceCop.setKeys(cop.getKeys());

          //System.out.println("cop, methodName :"+instanceCop+" "+ methodName);
          CIMValue cv=handle.invokeMethod(instanceCop, methodName, inParams, outParams);
          //System.out.println("invokeMethod complete : return value="+cv.getValue());
          if(logger.isLoggable(Level.FINE))
View Full Code Here

    logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "modifyInstance");
    if(className!=null && namespace!=null){
      try{
        if(instance instanceof CIMObjectPath)
        {
          CIMObjectPath copTemp=(CIMObjectPath)instance;
          CIMObjectPath cop=new CIMObjectPath(className,namespace);
          cop.setKeys(copTemp.getKeys());


          if(logger.isLoggable(Level.FINE))
            logger.fine(Thread.currentThread().getName()+" Actuator::Modify instance :cop"+cop);
View Full Code Here

TOP

Related Classes of org.pegasus.jmpi.CIMObjectPath

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.