Package java.util

Examples of java.util.Dictionary.keys()


      confs = cad.listConfigurations(filter);
    }
    if (confs != null)
      for (int i = 0; i < confs.length; i++) {
        Dictionary dic = confs[i].getProperties();
        Enumeration keys = dic.keys();
        while (keys.hasMoreElements()) {
          String key = (String) keys.nextElement();
          if (key.equals(name)) {
            dic.remove(key);
            try {
View Full Code Here


    private void listHeaders( JSONWriter jw, Bundle bundle ) throws JSONException
    {
        JSONArray val = new JSONArray();

        Dictionary headers = bundle.getHeaders(""); // don't localize at all - raw headers
        Enumeration he = headers.keys();
        while ( he.hasMoreElements() )
        {
            Object header = he.nextElement();
            String value = String.valueOf(headers.get( header ));
            // Package headers may be long, support line breaking by
View Full Code Here

    public Hashtable getProperties(String rolename) {
        try {
            Role role = ac.getUserAdmin().getRole(rolename);
            Dictionary dic = role.getProperties();
            Hashtable props = new Hashtable();
            Enumeration keys = dic.keys();
            while (keys.hasMoreElements()) {
                Object key = keys.nextElement();
                props.put(key, dic.get(key));
            }
            return props;
View Full Code Here

    public Hashtable getCredentials(String username) {
        try {
            User user = (User) ac.getUserAdmin().getRole(username);
            Dictionary dic = user.getCredentials();
            Hashtable credentials = new Hashtable();
            Enumeration keys = dic.keys();
            while (keys.hasMoreElements()) {
                Object key = keys.nextElement();
                credentials.put(key, dic.get(key));
            }
            return credentials;
View Full Code Here

        final Dictionary out = action.invoke(inputArgs);

        // prepare output arguments
        if (out != null && out.size() > 0)
        {
            for (Enumeration e = out.keys(); e.hasMoreElements();)
            {
                final String key = (String) e.nextElement();
                final UPnPStateVariable var = action.getStateVariable(key);

                Object value = out.get(key);
View Full Code Here

  /**
   * @see org.osgi.service.cm.Configuration#getProperties()
   */
  public Hashtable getProperties() {
    Dictionary dic=configuration.getProperties();
    Enumeration keys=dic.keys();
    Hashtable properties=new Hashtable();
    while(keys.hasMoreElements()) {
      Object key=keys.nextElement();
      properties.put(key, dic.get(key));
    }
View Full Code Here

          }
        }
  }
  public void deleteProperty(String key) throws Exception{
        Dictionary dic = configuration.getProperties();
        Enumeration keys = dic.keys();
        while (keys.hasMoreElements()) {
          String k = (String) keys.nextElement();
          if (k.equals(key)) {
            dic.remove(k);
              configuration.update(dic);
View Full Code Here

            pw.println("  Properties: none");
        }
        else
        {
            pw.println("  Properties: ");
            for (Enumeration e = props.keys(); e.hasMoreElements();)
            {
                final Object key = e.nextElement();
                pw.print("    "); //$NON-NLS-1$
                pw.print(key.toString());
                pw.print('=');
View Full Code Here

    // try to table lock all tables that are above
    // this threshold

    boolean didEscalate = false;
    for (Enumeration e = containers.keys(); e.hasMoreElements(); ) {
      ContainerKey ckey = (ContainerKey) e.nextElement();

      LockCount lc = (LockCount) containers.get(ckey);

      if (lc.count < threshold) {
View Full Code Here

   */

  if (Glob.match(set, request.url)) {
      Dictionary update = request.getQueryData(null);
      // System.out.println("Setting from: " + update);
      Enumeration enumer = update.keys();
      boolean changed = false;
      synchronized (p) {
    while(enumer.hasMoreElements()) {
        String key = (String) enumer.nextElement();
        if (p.containsKey(key) || isMatch(key)) {
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.