Package org.geoserver.security.impl

Examples of org.geoserver.security.impl.DataAccessRule


    @Override
    protected void onFormSubmit() {
        try {
            String roles = parseRole(rolesForComponent.getRolePalette().getDefaultModelObjectAsString());
            DataAccessRule rule = new DataAccessRule((String) workspace.getConvertedInput(),
                    (String) layer.getConvertedInput(),
                    (AccessMode) accessMode.getConvertedInput(), roles);
            DataAccessRuleDAO dao = DataAccessRuleDAO.get();
            dao.addRule(rule);
            dao.storeRules();
View Full Code Here


     * @author aaime
     *
     */
    class DuplicateRuleValidator extends AbstractFormValidator {
        public void validate(Form form) {
            DataAccessRule rule = new DataAccessRule((String) workspace.getConvertedInput(),
                    (String) layer.getConvertedInput(),
                    (AccessMode) accessMode.getConvertedInput(), rolesForComponent.getRolePalette()
                            .getDefaultModelObjectAsString());
            if (DataAccessRuleDAO.get().getRules().contains(rule)) {
                form.error(new ParamResourceModel("duplicateRule", getPage(), rule.getKey())
                        .getString());
            }
        }
View Full Code Here

    RolesFormComponent rolesForComponent;

    Form form;

    public AbstractDataAccessRulePage(DataAccessRule rule) {
        setDefaultModel(new CompoundPropertyModel(new DataAccessRule(rule)));

        // build the form
        form = new Form("ruleForm");
        add(form);
        form.add(workspace = new DropDownChoice("workspace", getWorkspaceNames()));
View Full Code Here

TOP

Related Classes of org.geoserver.security.impl.DataAccessRule

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.