Examples of Properties


Examples of org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties

    Map<String,String> loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
    if (loginMap.isEmpty()) {
      Property p = Property.TRACE_PASSWORD;
      at = new PasswordToken(conf.get(p).getBytes(Constants.UTF8));
    } else {
      Properties props = new Properties();
      int prefixLength = Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey().length() + 1;
      for (Entry<String,String> entry : loginMap.entrySet()) {
        props.put(entry.getKey().substring(prefixLength), entry.getValue());
      }
     
      AuthenticationToken token;
      try {
        token = AccumuloClassLoader.getClassLoader().loadClass(conf.get(Property.TRACE_TOKEN_TYPE)).asSubclass(AuthenticationToken.class).newInstance();
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.data.Properties

        final Map<String, Object> propertyMap2 =
            new HashMap<String, Object>() {
            {
                put(VERSION_PROPERTY_ID, "ver456");
            }};
        Properties propsV2 = createDocumentProperties("dummy", UnitTestTypeSystemCreator.VERSION_DOCUMENT_TYPE_ID, propertyMap2);

        Holder<String> idHolder = new Holder<String>(verIdV1);
        Holder<Boolean> contentCopied = new Holder<Boolean>(false);
        fVerSvc.checkOut(repositoryId, idHolder, null, contentCopied);
View Full Code Here

Examples of org.apache.falcon.entity.v0.cluster.Properties

    @Test
    public void testEvaluateExpression() throws Exception {
        Cluster cluster = new Cluster();
        cluster.setName("name");
        cluster.setColo("colo");
        cluster.setProperties(new Properties());
        Property prop = new Property();
        prop.setName("pname");
        prop.setValue("pvalue");
        cluster.getProperties().getProperties().add(prop);
View Full Code Here

Examples of org.apache.falcon.entity.v0.feed.Properties

        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));

        Property property = new Property();
        property.setName("1");
        property.setValue("1");
        newFeed.setProperties(new Properties());
        newFeed.getProperties().getProperties().add(property);
        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));

        newFeed.getProperties().getProperties().remove(0);
        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));
View Full Code Here

Examples of org.apache.felix.utils.properties.Properties

            }
            } catch (Exception e) {
                throw (IOException) new IOException(e.getMessage()).initCause(e);
            }
        }
        Properties p = new Properties(storageFile);
        for (Enumeration<String> keys = props.keys(); keys.hasMoreElements(); ) {
            String key = keys.nextElement();
            if (!Constants.SERVICE_PID.equals(key)
                    && !ConfigurationAdmin.SERVICE_FACTORYPID.equals(key)
                    && !FILEINSTALL_FILE_NAME.equals(key)) {
                if (props.get(key) != null) {
                    p.put(key, props.get(key).toString());
                }
            }
        }
        // remove "removed" properties from the file
        ArrayList<String> propertiesToRemove = new ArrayList<String>();
        for (String key : p.keySet()) {
            if (props.get(key) == null
                    && !Constants.SERVICE_PID.equals(key)
                    && !ConfigurationAdmin.SERVICE_FACTORYPID.equals(key)
                    && !FILEINSTALL_FILE_NAME.equals(key)) {
                propertiesToRemove.add(key);
            }
        }
        for (String key : propertiesToRemove) {
            p.remove(key);
        }
        // save the cfg file
        storage.mkdirs();
        p.save();
        updateFileInstall(storageFile);
    }
View Full Code Here

Examples of org.apache.ivory.entity.v0.cluster.Properties

    @Test
    public void testEvaluateExpression() throws Exception {
        Cluster cluster = new Cluster();
        cluster.setName("name");
        cluster.setColo("colo");
        cluster.setProperties(new Properties());
        Property prop = new Property();
        prop.setName("pname");
        prop.setValue("pvalue");
        cluster.getProperties().getProperties().add(prop);
       
View Full Code Here

Examples of org.apache.ivory.entity.v0.feed.Properties

        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));

        Property property = new Property();
        property.setName("1");
        property.setValue("1");
        newFeed.setProperties(new Properties());
        newFeed.getProperties().getProperties().add(property);
        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));

        newFeed.getProperties().getProperties().remove(0);
        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));
View Full Code Here

Examples of org.apache.karaf.util.Properties

        if (props == null) {
            System.err.println("No configuration is being edited. Run the edit command first");
        } else if (!bypassStorage && storage != null) {
          String pid = (String) this.session.get(PROPERTY_CONFIG_PID);
          File storageFile = new File(storage, pid + ".cfg");
            Properties p = new Properties(storageFile);
            for (Enumeration keys = props.keys(); keys.hasMoreElements();) {
                Object key = keys.nextElement();
                if (!"service.pid".equals(key) && !"felix.fileinstall.filename".equals(key)) {
                    p.put((String) key, (String) props.get(key));
                }
            }
            storage.mkdirs();
            p.save();
            this.session.put(PROPERTY_CONFIG_PID, null);
            this.session.put(PROPERTY_CONFIG_PROPS, null);
        } else {
            String pid = (String) this.session.get(PROPERTY_CONFIG_PID);
            Configuration cfg = admin.getConfiguration(pid, null);
View Full Code Here

Examples of org.apache.maven.plugins.changes.model.Properties

            {
                log.error( "Cannot build Changes Report from file: " + xmlPath.getPath() );
                return;
            }

            Properties properties = changesDocument.getProperties();

            if ( properties != null )
            {
                if ( properties.getAuthor() != null )
                {
                    this.author = properties.getAuthor().getName();
                    this.authorEmail = properties.getAuthor().getName();
                }
                this.title = properties.getTitle();
            }


            Body body = changesDocument.getBody();
View Full Code Here

Examples of org.apache.openejb.jee.jpa.unit.Properties

                persistenceUnit.setName(CMP_PERSISTENCE_UNIT_NAME);
                persistenceUnit.setTransactionType(TransactionType.JTA);
                persistenceUnit.setJtaDataSource("java:openejb/Resource/Default JDBC Database");
                persistenceUnit.setNonJtaDataSource("java:openejb/Resource/Default Unmanaged JDBC Database");
                // todo paramterize this
                Properties properties = new Properties();
                properties.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true, Indexes=false, IgnoreErrors=true)");
                // properties.setProperty("openjpa.DataCache", "false");
                // properties.setProperty("openjpa.Log", "DefaultLevel=TRACE");
                persistenceUnit.setProperties(properties);

                Persistence persistence = new Persistence();
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.