Package com.volantis.devrep.repository.impl.devices.policy

Examples of com.volantis.devrep.repository.impl.devices.policy.DefaultPolicyDescriptor


     * @throws RepositoryException
     */
    public void addPolicyDescriptor(Object temporary, String policyName, PolicyType type)
            throws RepositoryException {

        DefaultPolicyDescriptor descriptor = new DefaultPolicyDescriptor();
        descriptor.setPolicyType(type);
        addPolicyDescriptor(null, policyName, descriptor);
    }
View Full Code Here


                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                PolicyType type = new DefaultBooleanPolicyType();
                descriptor.setPolicyType(type);

                accessor.addPolicyDescriptor(connection, "boolean", descriptor);

                // Check the database contents
                checkPolicyTypeRow(conn, null, "boolean", 0, 0);
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                descriptor.setPolicyType(new DefaultBooleanPolicyType());
                accessor.addPolicyDescriptor(connection, "boolean", descriptor);
                accessor.removePolicyDescriptor(connection, "boolean");

                // Check the database contents are empty
                checkAllEmpty(conn);
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                DefaultSelectionPolicyType type =
                        new DefaultSelectionPolicyType();
                type.addKeyword("k1");
                type.addKeyword("k2");
                type.complete();
                descriptor.setPolicyType(type);
                accessor.addPolicyDescriptor(connection, "selection", descriptor);

                // Check the database contents
                checkPolicyTypeRow(conn, null, "selection", 0, 0);
                checkTypesRow(conn, null, 0, 4);
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                DefaultSelectionPolicyType selection =
                        new DefaultSelectionPolicyType();
                selection.addKeyword("k1");
                selection.addKeyword("k2");
                selection.complete();
                descriptor.setPolicyType(selection);
                accessor.addPolicyDescriptor(connection, "selection",
                        descriptor);
                accessor.removePolicyDescriptor(connection, "selection");

                // Check the database contents are empty
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                PolicyType type = new DefaultRangePolicyType(1, 100);
                descriptor.setPolicyType(type);
                accessor.addPolicyDescriptor(connection, "range", descriptor);

                // Check the database contents
                checkPolicyTypeRow(conn, null, "range", 0, 0);
                checkTypesRow(conn, null, 0, 3);
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                descriptor.setPolicyType(new DefaultRangePolicyType(3, 4));
                accessor.addPolicyDescriptor(connection, "range", descriptor);
                accessor.removePolicyDescriptor(connection, "range");

                // Check the database contents are empty
                checkAllEmpty(conn);
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                DefaultStructurePolicyType type =
                        new DefaultStructurePolicyType();
                type.addFieldType("f1", new DefaultBooleanPolicyType());
                type.addFieldType("f2", new DefaultRangePolicyType(2, 99));
                type.complete();
                descriptor.setPolicyType(type);
                accessor.addPolicyDescriptor(connection, "structure", descriptor);

                // Check the database contents
                checkCategoryRow(conn, null, 0, "category");
                checkPolicyTypeRow(conn, null, "structure", 0, 0);
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                DefaultStructurePolicyType structure =
                        new DefaultStructurePolicyType();
                structure.addFieldType("f1", new DefaultBooleanPolicyType());
                structure.addFieldType("f2", new DefaultIntPolicyType());
                structure.complete();
                descriptor.setPolicyType(structure);
                accessor.addPolicyDescriptor(connection, "structure", descriptor);
                accessor.removePolicyDescriptor(connection, "structure");

                // Check the database contents are empty
                checkAllEmpty(conn);
View Full Code Here

                        new JDBCDeviceRepositoryAccessor(repository, location);

                Connection conn = connection.getConnection();
                createTables(conn);

                DefaultPolicyDescriptor descriptor =
                        new DefaultPolicyDescriptor();
                descriptor.setCategory("category");
                DefaultOrderedSetPolicyType type =
                        new DefaultOrderedSetPolicyType(
                                new DefaultBooleanPolicyType());
                descriptor.setPolicyType(type);
                accessor.addPolicyDescriptor(connection, "oset", descriptor);

                // Check the database contents
                checkCategoryRow(conn, null, 0, "category");
                checkPolicyTypeRow(conn, null, "oset", 0, 0);
View Full Code Here

TOP

Related Classes of com.volantis.devrep.repository.impl.devices.policy.DefaultPolicyDescriptor

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.