Package org.apache.syncope.client.to

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


            if (policies != null) {
                res.addAll(Arrays.asList(policies));
            }

            PolicyTO globalPolicy = null;

            try {
                globalPolicy = (T) SyncopeSession.get().getRestTemplate().getForObject(
                        baseURL + "policy/" + policy + "/global/read", globalReference);
            } catch (Exception ignore) {
View Full Code Here


     * http://code.google.com/p/syncope/issues/detail?id=172. Creations of a new user without having a global password
     * policy stored into the local repository used to fail with a null pointer exception. This bug has been fixed
     * introducing a simple control.
     */
    public void issue172() {
        PolicyTO policyTO = restTemplate.getForObject(BASE_URL + "policy/read/{id}", PasswordPolicyTO.class, 2L);

        assertNotNull(policyTO);

        restTemplate.getForObject(BASE_URL + "policy/delete/{id}", PasswordPolicyTO.class, 2L);

View Full Code Here

     * http://code.google.com/p/syncope/issues/detail?id=172. Creations of a new user without having a global password
     * policy stored into the local repository used to fail with a null pointer exception. This bug has been fixed
     * introducing a simple control.
     */
    public void issue172() {
        PolicyTO policyTO = restTemplate.getForObject(BASE_URL + "policy/read/{id}", PasswordPolicyTO.class, 2L);

        assertNotNull(policyTO);

        restTemplate.getForObject(BASE_URL + "policy/delete/{id}", PasswordPolicyTO.class, 2L);

View Full Code Here

     * http://code.google.com/p/syncope/issues/detail?id=172. Creations of a new user without having a global password
     * policy stored into the local repository used to fail with a null pointer exception. This bug has been fixed
     * introducing a simple control.
     */
    public void issue172() {
        PolicyTO policyTO = restTemplate.getForObject(BASE_URL + "policy/read/{id}", PasswordPolicyTO.class, 2L);

        assertNotNull(policyTO);

        restTemplate.getForObject(BASE_URL + "policy/delete/{id}", PasswordPolicyTO.class, 2L);

View Full Code Here

     * http://code.google.com/p/syncope/issues/detail?id=172. Creations of a new user without having a global password
     * policy stored into the local repository used to fail with a null pointer exception. This bug has been fixed
     * introducing a simple control.
     */
    public void issue172() {
        PolicyTO policyTO = restTemplate.getForObject(BASE_URL + "policy/read/{id}", PasswordPolicyTO.class, 2L);

        assertNotNull(policyTO);

        restTemplate.getForObject(BASE_URL + "policy/delete/{id}", PasswordPolicyTO.class, 2L);

View Full Code Here

     * http://code.google.com/p/syncope/issues/detail?id=172. Creations of a new user without having a global password
     * policy stored into the local repository used to fail with a null pointer exception. This bug has been fixed
     * introducing a simple control.
     */
    public void issue172() {
        PolicyTO policyTO = restTemplate.getForObject(BASE_URL + "policy/read/{id}", PasswordPolicyTO.class, 2L);

        assertNotNull(policyTO);

        restTemplate.getForObject(BASE_URL + "policy/delete/{id}", PasswordPolicyTO.class, 2L);

View Full Code Here

        assertEquals(8, ((PasswordPolicyTO) policy).getSpecification().getMinLength());
    }

    @Test
    public void delete() {
        final PolicyTO policyTO = restTemplate.getForObject(BASE_URL + "policy/read/{id}", SyncPolicyTO.class, 7L);

        assertNotNull("find to delete did not work", policyTO);

        PolicyTO policyToDelete =
                restTemplate.getForObject(BASE_URL + "policy/delete/{id}", SyncPolicyTO.class, 7L);
        assertNotNull(policyToDelete);

        Throwable t = null;
        try {
View Full Code Here

            @Override
            public void populateItem(final Item<ICellPopulator<PolicyTO>> cellItem, final String componentId,
                    final IModel<PolicyTO> model) {

                final PolicyTO accountPolicyTO = model.getObject();

                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);

                panel.add(new ActionLink() {

                    private static final long serialVersionUID = -3722207913631435501L;

                    @Override
                    public void onClick(final AjaxRequestTarget target) {

                        mwindow.setPageCreator(new ModalWindow.PageCreator() {

                            private static final long serialVersionUID = -7834632442532690940L;

                            @Override
                            public Page createPage() {
                                return new PolicyModalPage(mwindow, accountPolicyTO, pageRef);
                            }
                        });

                        mwindow.show(target);
                    }
                }, ActionLink.ActionType.EDIT, "Policies", "read");

                panel.add(new ActionLink() {

                    private static final long serialVersionUID = -3722207913631435501L;

                    @Override
                    public void onClick(final AjaxRequestTarget target) {
                        try {

                            policyRestClient.delete(accountPolicyTO.getId(), accountPolicyTO.getClass());
                            info(getString("operation_succeded"));

                        } catch (SyncopeClientCompositeErrorException e) {
                            error(getString("operation_error"));

                            LOG.error("While deleting resource {}({})", new Object[]{accountPolicyTO.getId(),
                                        accountPolicyTO.getDescription()}, e);
                        }

                        target.add(container);
                        target.add(getPage().get("feedback"));
                    }
View Full Code Here

            return new CompoundPropertyModel<PolicyTO>(object);
        }
    }

    private PolicyTO getPolicyTOInstance(final PolicyType policyType) {
        PolicyTO policyTO;
        switch (policyType) {
            case GLOBAL_ACCOUNT:
                policyTO = new AccountPolicyTO(true);
                break;
View Full Code Here

            if (policies != null) {
                res.addAll(Arrays.asList(policies));
            }

            if (includeGlobal) {
                PolicyTO globalPolicy = null;

                try {
                    globalPolicy = (T) SyncopeSession.get().getRestTemplate().getForObject(
                            baseURL + "policy/" + policy + "/global/read", globalReference);
                } catch (Exception ignore) {
View Full Code Here

TOP

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

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.