Examples of CIMProperty


Examples of org.sblim.wbem.cim.CIMProperty

    Iterator it=properties.iterator();
    String superClass=cimclass.getSuperClass();

    while(it.hasNext())
    {
      CIMProperty cimProp=(CIMProperty)it.next();
      //System.out.println("cimProp "+cimProp.toString());
      String propName=cimProp.getName();
      //System.out.println("propName "+propName);

      propertyNames.add(propName);

    }
    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())
      {
        CIMProperty cimProp=(CIMProperty)proppertiesSuperIt.next();
        if (!propertyNames.contains(cimProp.getName()))
        {
          properties.add(cimProp);
          String propName=cimProp.getName();
          propertyNames.add(propName);
          if(logger.isLoggable(Level.FINE))
            logger.fine(cimProp.getName()+"new superclass property found "+cimProp.getName());


        }
        else
        {
          if(logger.isLoggable(Level.FINE))
            logger.fine(cimProp.getName()+"already exists ,Super class variable ignored");

        }

      }
      superClass=cimclass.getSuperClass();
View Full Code Here

Examples of org.sblim.wbem.cim.CIMProperty

              if(isAssoc)
              {
                           
                  if(logger.isLoggable(Level.FINE))
                      logger.fine(Thread.currentThread().getName()+" class is an association");
                  CIMProperty srcProperty=associationClass.getProperty(role);
                             
                  if(logger.isLoggable(Level.FINE))
                      logger.fine(Thread.currentThread().getName()+" check to see if the role played by src class is correct");
                  if(logger.isLoggable(Level.FINE))
                      logger.fine(Thread.currentThread().getName()+" src RefClassName(),className::"+
                          srcProperty.getOriginClass()+" "+className);
                  //check to see if the role played by src class is correct
                 
                  if(_classNameMatchesString(srcProperty.getType().getRefClassName().trim(), classPath, className))
                  {
                 
                      CIMProperty resultProperty=associationClass.getProperty(resultRole);
                                       
                      if(logger.isLoggable(Level.FINE))
                          logger.fine(Thread.currentThread().getName()+" check to see if role played by result class is corrrect");
                      if(logger.isLoggable(Level.FINE))
                          logger.fine(Thread.currentThread().getName()+" result RefClassName(),className::"+
                              resultProperty.getType().getRefClassName()+" "+resultClass);
                     
                      //check to see if role played by result class is corrrect
                      if(_classNameMatchesString(resultProperty.getType().getRefClassName().trim(), classPath, resultClass))
                      {
                                             
                          if(logger.isLoggable(Level.FINE))
                              logger.fine(Thread.currentThread().getName()+" associationExists returning true");
                         
                          logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "associationExists");
                          return true;
                      }
                      else
                      {
                                           
                          if(logger.isLoggable(Level.FINE))
                              logger.fine(Thread.currentThread().getName()+" associationExists returning false " +
                                  "because of resultClass "+resultClass+ " "+resultProperty.getType().getRefClassName());
                         
                          logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "associationExists");
                          return false;
                      }
                  }
View Full Code Here

Examples of org.sblim.wbem.cim.CIMProperty

    cop.setNameSpace("root/cimv2");
    Enumeration enm = _cimClient.enumerateInstances(cop, true, true, true, true, null);
    while (enm.hasMoreElements ())
        {
           CIMInstance cimInstance = (CIMInstance)enm.nextElement ();
           CIMProperty cimProperty = cimInstance.getProperty("PolicyString");
           CIMValue policyStringCimValue = cimProperty.getValue();
         String policyString = policyStringCimValue.toString();
        
         CIMProperty cimProperty2 = cimInstance.getProperty("PolicyRuleName");
         CIMValue policyRuleCimValue = cimProperty2.getValue();
       String policyName = policyRuleCimValue.toString();
         System.out.println("----------------------------");
         System.out.println("Policy Name: " + policyName);
         System.out.println("Policy String: " + policyString);
         System.out.println("----------------------------");
View Full Code Here

Examples of org.sblim.wbem.cim.CIMProperty

    boolean localOnly = true;
    Vector kvp = new Vector ();
    CIMDataType strType = new CIMDataType(CIMDataType.STRING);
    CIMValue policyStringCimValue = new CIMValue (policyString,strType);
   
        kvp.addElement (new CIMProperty ("PolicyRuleName", new CIMValue (policyName,strType)));
       
        CIMObjectPath cop = new CIMObjectPath ("CIM_SPLPolicyRule", kvp);
        cop.setNameSpace ("root/cimv2");
       
      CIMInstance cimInstance = _cimClient.getInstance(cop, localOnly);
View Full Code Here

Examples of org.sblim.wbem.cim.CIMProperty

   
    cop.addKey("PolicyRuleName", policyNameCimValue);
    
    CIMInstance cimInstance = _cimClient.getInstance(cop, localOnly);
    
    CIMProperty cimProperty = cimInstance.getProperty("PolicyString");
    CIMValue policyStringCimValue = cimProperty.getValue();
    String policyString = policyStringCimValue.toString();
    System.out.println("Policy String: " + policyString);
        return policyString;

   
View Full Code Here

Examples of org.sblim.wbem.cim.CIMProperty

     CIMDataType strType = new CIMDataType(CIMDataType.STRING);
     CIMValue policyNameCimValue = new CIMValue (policyName,strType);
    
     CIMValue policyStringCimValue = new CIMValue(policyString,strType);

         kvp.addElement (new CIMProperty ("PolicyRuleName", policyNameCimValue));
         kvp.addElement (new CIMProperty ("PolicyString", policyStringCimValue));

         CIMObjectPath cop = new CIMObjectPath ("CIM_SPLPolicyRule", kvp);
         cop.setNameSpace ("root/cimv2");

         CIMInstance ci = new CIMInstance (cop);
View Full Code Here

Examples of org.sblim.wbem.cim.CIMProperty

              Object keyValue = properties.get(keyName);
              Iterator instancePropertyIterator = instanceProperties.iterator();

              while(instancePropertyIterator.hasNext())
              {
                CIMProperty cimprop=(CIMProperty)instancePropertyIterator.next();
                String name=cimprop.getName();
                int type=cimprop.getType().getType();
              //  boolean isArray=cimprop.isArray();
                CIMValue instValue=cimprop.getValue();
                if(cimprop.getName().equalsIgnoreCase(keyName))
                {
                  Object cimKeyValue = keyValue;
                  if(logger.isLoggable(Level.FINE))
                    logger.fine(Thread.currentThread().getName()+
                        " Instance property:: Name,Type,Value,CIMKeyValue :"+name+" "+type+" "
                          +instValue+" "+ cimKeyValue.getClass());

                  CIMValue cimval = getCIMObjectOfGivenType(type,cimKeyValue);


                  cimprop.setValue(cimval);
                  handle.setProperty(cimInstance.getObjectPath(), keyName, cimval);
                  modifiedProperties.add(cimprop);
                  if(logger.isLoggable(Level.FINE))
                    logger.fine(Thread.currentThread().getName()+" cimprop set to cimValue "+cimval.getValue());
                }
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.