Package org.apache.syncope.client.to

Examples of org.apache.syncope.client.to.VirtualSchemaTO


        }
    }

    @Test
    public void read() {
        VirtualSchemaTO VirtualSchemaTO = restTemplate.getForObject(BASE_URL
                + "virtualSchema/membership/read/mvirtualdata.json", VirtualSchemaTO.class);
        assertNotNull(VirtualSchemaTO);
    }
View Full Code Here


        assertNotNull(VirtualSchemaTO);
    }

    @Test
    public void create() {
        VirtualSchemaTO schema = new VirtualSchemaTO();
        schema.setName("virtual");

        VirtualSchemaTO actual = restTemplate.postForObject(BASE_URL + "virtualSchema/user/create.json", schema,
                VirtualSchemaTO.class);
        assertNotNull(actual);

        actual = restTemplate.getForObject(BASE_URL + "virtualSchema/user/read/" + actual.getName() + ".json",
                VirtualSchemaTO.class);
        assertNotNull(actual);
    }
View Full Code Here

        assertNotNull(actual);
    }

    @Test
    public void delete() {
        VirtualSchemaTO schema = restTemplate.getForObject(BASE_URL + "virtualSchema/role/read/rvirtualdata.json",
                VirtualSchemaTO.class);
        assertNotNull(schema);

        VirtualSchemaTO deletedSchema =
                restTemplate.getForObject(BASE_URL + "virtualSchema/role/delete/{schema}", VirtualSchemaTO.class,
                schema.getName());
        assertNotNull(deletedSchema);

        Throwable t = null;
View Full Code Here

    @Override
    public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
            AbstractBaseBean schema, final boolean createFlag) {

        if (schema == null) {
            schema = new VirtualSchemaTO();
        }

        final Form schemaForm = new Form("form");

        schemaForm.setModel(new CompoundPropertyModel(schema));

        final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
                schema, "name"));
        name.addRequiredLabel();

        name.setEnabled(createFlag);

        final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("submit"), pageRef) {

            private static final long serialVersionUID = -958724007591692537L;

            @Override
            protected void onSubmitInternal(final AjaxRequestTarget target, final Form form) {
                VirtualSchemaTO schemaTO = (VirtualSchemaTO) form.getDefaultModelObject();
                try {
                    if (createFlag) {
                        restClient.createVirtualSchema(kind, schemaTO);
                    } else {
                        restClient.updateVirtualSchema(kind, schemaTO);
View Full Code Here

                HttpStatus.BAD_REQUEST));
    }

    public <T extends AbstractVirSchema> VirtualSchemaTO getVirtualSchemaTO(final T virtualSchema) {

        VirtualSchemaTO virtualSchemaTO = new VirtualSchemaTO();
        BeanUtils.copyProperties(virtualSchema, virtualSchemaTO, ignoreVirtualSchemaProperties);

        return virtualSchemaTO;
    }
View Full Code Here

        AbstractVirSchema virtualSchema = virtualSchemaDAO.find(virtualSchemaName, reference);
        if (virtualSchema == null) {
            throw new NotFoundException("Virtual schema '" + virtualSchemaName + "'");
        }

        VirtualSchemaTO schemaToDelete = virtualSchemaDataBinder.getVirtualSchemaTO(virtualSchema);
        virtualSchemaDAO.delete(virtualSchemaName, getAttributableUtil(kind));

        auditManager.audit(Category.schema, SchemaSubCategory.deleteVirtual, Result.success,
                "Successfully deleted virtual schema: " + kind + "/" + virtualSchema.getName());
        return schemaToDelete;
View Full Code Here

        }
    }

    @Test
    public void read() {
        VirtualSchemaTO VirtualSchemaTO = restTemplate.getForObject(BASE_URL
                + "virtualSchema/membership/read/mvirtualdata.json", VirtualSchemaTO.class);
        assertNotNull(VirtualSchemaTO);
    }
View Full Code Here

        assertNotNull(VirtualSchemaTO);
    }

    @Test
    public void create() {
        VirtualSchemaTO schema = new VirtualSchemaTO();
        schema.setName("virtual");

        VirtualSchemaTO actual = restTemplate.postForObject(BASE_URL + "virtualSchema/user/create.json", schema,
                VirtualSchemaTO.class);
        assertNotNull(actual);

        actual = restTemplate.getForObject(BASE_URL + "virtualSchema/user/read/" + actual.getName() + ".json",
                VirtualSchemaTO.class);
        assertNotNull(actual);
    }
View Full Code Here

        assertNotNull(actual);
    }

    @Test
    public void delete() {
        VirtualSchemaTO schema = restTemplate.getForObject(BASE_URL + "virtualSchema/role/read/rvirtualdata.json",
                VirtualSchemaTO.class);
        assertNotNull(schema);

        VirtualSchemaTO deletedSchema =
            restTemplate.getForObject(BASE_URL + "virtualSchema/role/delete/{schema}", VirtualSchemaTO.class,
                    schema.getName());
        assertNotNull(deletedSchema);

        Throwable t = null;
View Full Code Here

    @Override
    public void setSchemaModalPage(final PageReference callerPageRef, final ModalWindow window,
            AbstractBaseBean schema, final boolean createFlag) {

        if (schema == null) {
            schema = new VirtualSchemaTO();
        }

        final Form schemaForm = new Form("form");

        schemaForm.setModel(new CompoundPropertyModel(schema));

        final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
                schema, "name"));
        name.addRequiredLabel();

        name.setEnabled(createFlag);

        final IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit")) {

            private static final long serialVersionUID = -958724007591692537L;

            @Override
            protected void onSubmit(final AjaxRequestTarget target, final Form form) {

                VirtualSchemaTO schemaTO = (VirtualSchemaTO) form.getDefaultModelObject();

                try {
                    if (createFlag) {
                        restClient.createVirtualSchema(kind, schemaTO);
                    } else {
View Full Code Here

TOP

Related Classes of org.apache.syncope.client.to.VirtualSchemaTO

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.