Package com.sun.messaging.jmq.admin.objstore

Examples of com.sun.messaging.jmq.admin.objstore.ObjStoreAttrs


  /*
   * Get object type, props object, and lookup name
   */
  String type = objMgrProps.getObjType();
  Properties objProps = objMgrProps.getObjProperties();
  ObjStoreAttrs osa = objMgrProps.getObjStoreAttrs();
  String lookupName = objMgrProps.getLookupName();

  /*
   * Check if -f (force) was specified on cmd line.
   */
 
View Full Code Here


     *       
     * @return  A ObjStoreAttrs object containing attributes
     *    needed for creation of an object store.
     */
    public ObjStoreAttrs getObjStoreAttrs(int commandIndex)  {
  ObjStoreAttrs  osa = new ObjStoreAttrs();
  String    objstoreAttrsStr = OBJMGR_OBJSTORE_ATTRS_PROP_NAME + ".";
  int    objstoreAttrsStrLen = objstoreAttrsStr.length();

  if (commandIndex == -1)  {
            for (Enumeration e = propertyNames();  e.hasMoreElements() ;) {
    String propName = (String)e.nextElement();

    if (propName.startsWith(objstoreAttrsStr))  {
        String newPropName, value;

        newPropName = propName.substring(objstoreAttrsStrLen);
        value = getProperty(propName);

        osa.put(newPropName, value);
    }
            }
     
      return (osa);
  }
View Full Code Here

     *       
     * @return  A ObjStoreAttrs object containing attributes
     *    needed for creation of an object store.
     */
    public ObjStoreAttrs getObjStoreAttrs(int index)  {
  ObjStoreAttrs  osa = new ObjStoreAttrs();
  String    basePropName, objstoreAttrsStr, idPropName, descPropName;
  String    id, desc;
  int    objstoreAttrsStrLen;

  basePropName = PROP_NAME_OBJSTORE_BASENAME
        + new Integer(index).toString()
        + ".";

  idPropName = basePropName
      + PROP_NAME_OBJSTORE_ID_PREFIX;
  id = getProperty(idPropName, "");

  descPropName = basePropName
      + PROP_NAME_OBJSTORE_DESC_PREFIX;
  desc = getProperty(descPropName, "");

  osa = new ObjStoreAttrs(id, desc);

  /*
   * Construct string:
   *  objstore1.attrs.
   */
  objstoreAttrsStr = PROP_NAME_OBJSTORE_BASENAME
        + new Integer(index).toString()
        + "."
        + PROP_NAME_OBJSTORE_ATTR_PREFIX
        + ".";

  objstoreAttrsStrLen = objstoreAttrsStr.length();

        for (Enumeration e = propertyNames();  e.hasMoreElements() ;) {
      String propName = (String)e.nextElement();

      if (propName.startsWith(objstoreAttrsStr))  {
          String newPropName, value;
                newPropName = propName.substring(objstoreAttrsStrLen);
                value = getProperty(propName);
   
                osa.put(newPropName, value);
            }
        }
     
  return (osa);
    }
View Full Code Here

      }
  }
*/

  ObjAdminEvent oae;
  ObjStoreAttrs osa = constructAttrs(osName);

  if (osa == null)
      return;

  oae = new ObjAdminEvent(this, ObjAdminEvent.ADD_OBJSTORE);
View Full Code Here

    osText.selectAll();
      //}
      return (null);
  }

  ObjStoreAttrs osa = new ObjStoreAttrs(osName, osName);

  if (jndiProps == null) {
      return (osa);
  }

        // Check for any properties that MUST be set.
        if (checkMandatoryProps() == 0) {
            return null;
        }

  for (Enumeration e = jndiProps.propertyNames(); e.hasMoreElements();) {
      String propName = (String)e.nextElement();
      osa.put(propName, jndiProps.getProperty(propName));
  }

  return (osa);
    }
View Full Code Here

  }

        /*
   * Now add these to the object store.
   */
  ObjStoreAttrs osa = os.getObjStoreAttrs();

  if (!osa.containsKey(Context.SECURITY_PRINCIPAL)) {
      this.os.addObjStoreAttr(Context.SECURITY_PRINCIPAL, principalValue);
  }
  if (!osa.containsKey(Context.SECURITY_CREDENTIALS)) {
      this.os.addObjStoreAttr(Context.SECURITY_CREDENTIALS, credentialsValue);
  }
 
  ObjAdminEvent oae = new ObjAdminEvent(this,
        ObjAdminEvent.UPDATE_CREDENTIALS);
View Full Code Here

  this.os = os;
  this.missingInfo  = missingInfo;

  doClear();

  ObjStoreAttrs osa = os.getObjStoreAttrs();
  /*
   * Fill in principal, credentials if we have it
   */
  if (osa.containsKey(Context.SECURITY_CREDENTIALS)) {
      credentialsText.setText((String)osa.get(Context.SECURITY_CREDENTIALS));
  } else {
      credentialsText.requestFocus();
  }

  /*
   * Fill in this one second in case both are missing
   * and we want to focus in the principal text field.
   */
  if (osa.containsKey(Context.SECURITY_PRINCIPAL)) {
      principalText.setText((String)osa.get(Context.SECURITY_PRINCIPAL));
  } else {
      principalText.requestFocus();
  }

  setDefaultButton(OK);
View Full Code Here

  }
*/

  ObjAdminEvent oae;
  ObjStoreAttrs osa = constructAttrs(osName);

  if (osa == null)
      return;

  oae = new ObjAdminEvent(this, ObjAdminEvent.UPDATE_OBJSTORE);
View Full Code Here

  this.osCObj = osCObj;
  ObjStore os = osCObj.getObjStore();

  checkBox.setSelected(true);

  ObjStoreAttrs attrs = os.getObjStoreAttrs();
  jndiProps.clear();
  if (attrs != null) {
      for (java.util.Enumeration e = attrs.keys(); e.hasMoreElements(); ) {
    String key = (String)e.nextElement();
    jndiProps.setProperty(key, (String)attrs.get(key));
      }
      model.fireTableRowsInserted(0, attrs.size()-1);
         // Select the first one in the list.
      if (attrs.size() >= 1) {
    table.setRowSelectionInterval(0, 0);
      }
  } else {
      comboBox.setSelectedIndex(0);
      delButton.setEnabled(false);
View Full Code Here

            osText.selectAll();

      return (null);
  }

  ObjStoreAttrs osa = new ObjStoreAttrs(osName, osName);

  if (jndiProps == null) {
      return (osa);
  }

        // Check for any properties that MUST be set.
        if (checkMandatoryProps() == 0) {
      return null;
  }

  for (java.util.Enumeration e = jndiProps.propertyNames();
          e.hasMoreElements();) {
    String propName = (String)e.nextElement();
     osa.put(propName, jndiProps.getProperty(propName));
  }

  return (osa);
    }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.admin.objstore.ObjStoreAttrs

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.