Examples of CIMObjectPath


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

Examples of org.pegasus.jmpi.CIMObjectPath

              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

Examples of org.pegasus.jmpi.CIMObjectPath

    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

Examples of org.pegasus.jmpi.CIMObjectPath

      {
    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

Examples of org.pegasus.jmpi.CIMObjectPath

    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

Examples of org.sblim.wbem.cim.CIMObjectPath

  public static String getReferenceTypeName(String reference)
  {

    //extract class name and return
    String referenceType = null;
    CIMObjectPath cop = new CIMObjectPath(reference);
    //CIMObjectPath cop=CIMObjectPath.toCop(reference);
    referenceType=cop.getObjectName();     

    return referenceType;
  }
View Full Code Here

Examples of org.sblim.wbem.cim.CIMObjectPath

  private void _populateClassMembers(String className,String classPath, Map symbolMap) throws SPLException
  {
    if(className!=null && classPath!=null)
    {
      CIMObjectPath cop=new CIMObjectPath(className,classPath);
      if(logger.isLoggable(Level.FINE))
        logger.fine(Thread.currentThread().getName()+" cop   "+cop);
      Map symbols=symbolMap;
      //get class
      try
View Full Code Here

Examples of org.sblim.wbem.cim.CIMObjectPath

    }
    superClass=cimclass.getSuperClass();

    while((superClass!= null)&&(superClass!= "")&&(superClass.length()!=0))
    {
      CIMObjectPath cop=new CIMObjectPath(superClass,classPath);
      cimclass=_handle.getClass(cop, true, true, true, null);

      Vector propertiesSuper=cimclass.getAllProperties();
      Iterator proppertiesSuperIt=propertiesSuper.iterator();
      while(proppertiesSuperIt.hasNext())
View Full Code Here

Examples of org.sblim.wbem.cim.CIMObjectPath

    else
    {
      formattedClass = className;
    }
    //System.out.println("formatted class" + formattedClass);
    CIMObjectPath classCop=new CIMObjectPath(formattedClass,namespace);
    List instanceList=new ArrayList();
    try{
      Enumeration instanceEnumeration=_handle.enumerateInstanceNames(classCop);
      while(instanceEnumeration.hasMoreElements())
      {
View Full Code Here

Examples of org.sblim.wbem.cim.CIMObjectPath

  public boolean associationExists(String className ,String classPath, String resultClass,
         String assocClass, String role, String resultRole) throws SPLException
  {
          logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "associationExists");
          CIMObjectPath cop=new CIMObjectPath(assocClass,classPath);
          if(logger.isLoggable(Level.FINE))
              logger.fine(Thread.currentThread().getName()+" associationExists::cop ::"+cop);
          try
          {
           
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.