Examples of ObservableProperties


Examples of com.volantis.mcs.eclipse.common.ObservableProperties

     * device property changes
     * @return an ObservableProperties instance
     */
    public ObservableProperties getProperties() {
        if (properties == null) {
            properties = new ObservableProperties(accessor.getProperties());
        }
        return properties;
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.ObservableProperties

        String policy = getPolicyName();
        // obtain the localized name from the control
        String localizedName = nameField.getText();
        if (!localizedName.equals(
                    dram.getLocalizedPolicyName(policy))) {
            ObservableProperties properties = dram.getProperties();
            // remove the listener that is registered
            properties.removePropertyChangeListener(propertyChangeListener);
            try {
                // update the properties
                dram.setLocalizedPolicyName(policy, localizedName);
            } finally {
                // re-register the property change listener
                properties.addPropertyChangeListener(propertyChangeListener);
            }

        }
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.ObservableProperties

        String policy = getPolicyName();
        // obtain the help text in the control
        String helpText = helpTextArea.getText();
        if (!helpText.equals(
                    dram.getPolicyDescription(policy))) {
            ObservableProperties properties = dram.getProperties();
            // remove the listener that is registered
            properties.removePropertyChangeListener(propertyChangeListener);
            try {
                // update the properties
                dram.setPolicyDescription(policy, helpText);
            } finally {
                // re-register the property change listener
                properties.addPropertyChangeListener(propertyChangeListener);
            }

        }
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.ObservableProperties

        }

        // We need to be notified of changes to the properties file associated
        // with the device repository so that we can refresh the viewer. So,
        // we use an ObservableProperties to provide this facility.
        ObservableProperties op = dram.getProperties();
        op.addPropertyChangeListener(new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent evt) {
                viewer.refresh();
            }
        });
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.ObservableProperties

        displayArea.layout();
        policiesSection.setFocus();

        // Add listener for changes to properties in device repository
        ObservableProperties properties =
                context.getDeviceRepositoryAccessorManager().getProperties();
        properties.addPropertyChangeListener(new PropertyChangeListener() {
            // Javadoc inherited
            public void propertyChange(PropertyChangeEvent evt) {
                setDirty(true);
            }
        });
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.ObservableProperties

     * {@inheritDoc}
     */
    protected void setUp() throws Exception {
        super.setUp();
       
        m_dict = new ObservableProperties(null, null);
    }
View Full Code Here

Examples of org.w3c.util.ObservableProperties

  // tk, 1 February 2004,
  // added optional client authentication,
  // which is forced, if a truststore is configured and
  // the org.w3c.jigsaw.ssl.authenticate is not set to false
  if (serversocket instanceof SSLServerSocket) {
      ObservableProperties props = daemon.getProperties();
       
        // decide client authentication based on trust configuration
      boolean mandatory;
      mandatory = props.getBoolean(SSLProperties.MUST_AUTHENTICATE_P,
           false);
      boolean generic;
      generic = props.getBoolean(SSLProperties.TRUSTSTORE_GENERIC_P,
               false);
      String trust;
      trust = props.getString(SSLProperties.TRUSTSTORE_PATH_P,
            null);
     
      boolean authenticate = mandatory||generic||
                       ((null != trust)&&(trust.length() > 0));
     
View Full Code Here

Examples of org.w3c.util.ObservableProperties

     */
    public void initialize(httpd server) {
        super.initialize(server);
        daemon = server;
        daemon.registerPropertySet(new SSLProperties(daemon));
        ObservableProperties props = daemon.getProperties();
 
        try {
           
      // Providers or protocols are switched by default
      // in a compatible way as postulated by the JDK 1.4 policies
      String provider;
      provider = props.getString(SSLProperties.SECURITY_PROVIDER_P,
               (supportsOptionalClientAuth ? null :
             SSLProperties.DEFAULT_SECURITY_PROVIDER));
      addProvider(provider);
     
      String handler = props.getString(SSLProperties.PROTOCOL_HANDLER_P,
            (supportsOptionalClientAuth ? null :
              SSLProperties.DEFAULT_PROTOCOL_HANDLER));
      setHandler(handler);
     
      context = createContext(props);
     
      String bindAddrName = props.getString(BINDADDR_P, null);
      if (bindAddrName != null) {
    try {
        bindAddr = InetAddress.getByName(bindAddrName);
    } catch (Exception ex) {
        bindAddr = null;
    }
      } else {
    bindAddr = null;
      }
     
      maxClients = props.getInteger(MAXCLIENTS_P, MAXCLIENTS);
     
        } catch (Exception ex) {
      String mes;
      mes = "Unable to initialize secure socket provider";
      daemon.fatal(ex, mes);
View Full Code Here

Examples of org.w3c.util.ObservableProperties

     * @return true if and only if the modification has been handled
     * successfully
     */
    public boolean propertyChanged(String name) {
        if (super.propertyChanged(name)) {
      ObservableProperties props = daemon.getProperties();
     
      try {
    if (name.equals(MAXCLIENTS_P)) {
                    int newmax = props.getInteger(MAXCLIENTS_P, -1);
                    if (newmax > maxClients) {
      for (int i = maxClients-newmax; --i >= 0; ) {
          addClient(true);
      }
                    } else if (newmax > 0) {
      maxClients = newmax;
                    }
                    return true;
    } else if (name.equals(BINDADDR_P)) {
        bindAddr = InetAddress.getByName(
      props.getString(BINDADDR_P, null));
        return true;
    } else if ((name.equals(SSLProperties.KEYSTORE_GENERIC_P)) ||
         (name.equals(SSLProperties.KEYSTORE_PATH_P)) ||
         (name.equals(SSLProperties.KEYSTORE_TYPE_P)) ||
         (name.equals(SSLProperties.KEYSTORE_PASSWORD_P)) ||
View Full Code Here

Examples of org.w3c.util.ObservableProperties

    public ResourceReference createDefaultResource(String name) {
  throw new RuntimeException("static container");
   

    protected void saveProperties() {
  ObservableProperties props = server.getProperties();
  File propfile = new File(props.getString(httpd.PROPS_P, null));
  // Did we guessed were the place to save the property file ?
  if ( propfile == null) {
      throw new RuntimeException("Unable to save properties: property "+
               httpd.PROPS_P+" undefined.");
  } else {
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.