Package org.zanata.webtrans.shared.model

Examples of org.zanata.webtrans.shared.model.ValidationId


        return Arrays.asList(ValidationAction.State.values());
    }

    @Restrict("#{s:hasPermission(versionHome.instance, 'update')}")
    public void updateValidationOption(String name, String state) {
        ValidationId validatationId = ValidationId.valueOf(name);

        for (Map.Entry<ValidationId, ValidationAction> entry : getValidations()
                .entrySet()) {
            if (entry.getKey().name().equals(name)) {
                getValidations().get(validatationId).setState(
                        ValidationAction.State.valueOf(state));
                getInstance().getCustomizedValidations().put(
                        entry.getKey().name(),
                        entry.getValue().getState().name());
                ensureMutualExclusivity(getValidations().get(validatationId));
                break;
            }
        }
        update();
        conversationScopeMessages.setMessage(FacesMessage.SEVERITY_INFO,
                msgs.format("jsf.validation.updated",
                        validatationId.getDisplayName(), state));
    }
View Full Code Here


        return availableValidations;
    }

    @Restrict("#{s:hasPermission(projectHome.instance, 'update')}")
    public void updateValidationOption(String name, String state) {
        ValidationId validatationId = ValidationId.valueOf(name);

        for (Map.Entry<ValidationId, ValidationAction> entry : getValidations()
                .entrySet()) {
            if (entry.getKey().name().equals(name)) {
                getValidations().get(validatationId).setState(
                        ValidationAction.State.valueOf(state));
                getInstance().getCustomizedValidations().put(
                        entry.getKey().name(),
                        entry.getValue().getState().name());
                ensureMutualExclusivity(getValidations().get(validatationId));
                break;
            }
        }
        update();

        conversationScopeMessages.setMessage(FacesMessage.SEVERITY_INFO,
                msgs.format("jsf.validation.updated",
                        validatationId.getDisplayName(), state));
    }
View Full Code Here

    }

    public void testTextFlowTargetHasError() throws Exception {
        // Given:
        Long targetId = new Long("1000");
        ValidationId validationId = ValidationId.HTML_XML;
        Map<ValidationId, Boolean> map = new HashMap<ValidationId, Boolean>();

        // When:
        when(targetValidationLoader.load(targetId)).thenReturn(map);
View Full Code Here

    }

    public void testTextFlowTargetHasError2() throws Exception {
        // Given:
        Long targetId = new Long("1000");
        ValidationId validationId = ValidationId.HTML_XML;
        Map<ValidationId, Boolean> map = new HashMap<ValidationId, Boolean>();
        map.put(validationId, true);

        // When:
        when(targetValidationLoader.load(targetId)).thenReturn(map);
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.shared.model.ValidationId

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.