Examples of PermType


Examples of com.mossle.auth.domain.PermType

    @RequestMapping("perm-type-input")
    public String input(@RequestParam(value = "id", required = false) Long id,
            Model model) {
        if (id != null) {
            PermType permType = permTypeManager.get(id);
            model.addAttribute("model", permType);
        }

        return "auth/perm-type-input";
    }
View Full Code Here

Examples of com.mossle.auth.domain.PermType

    @RequestMapping("perm-type-save")
    public String save(@ModelAttribute PermType permType,
            RedirectAttributes redirectAttributes) {
        // copy
        PermType dest = null;
        Long id = permType.getId();

        if (id != null) {
            dest = permTypeManager.get(id);
            beanMapper.copy(permType, dest);
        } else {
            dest = permType;
        }

        if (id == null) {
            dest.setScopeId(ScopeHolder.getScopeId());
        }

        // save
        permTypeManager.save(dest);
View Full Code Here

Examples of com.mossle.auth.domain.PermType

                String type = array[2];

                Perm perm = permManager.findUnique(
                        "from Perm where code=? and scopeId=?", code,
                        ScopeHolder.getScopeId());
                PermType permType = permTypeManager.findUniqueBy("name", type);

                if (permType == null) {
                    permType = new PermType();
                    permType.setName(type);
                    permType.setType(0);
                    permType.setScopeId(ScopeHolder.getScopeId());
                    permTypeManager.save(permType);
                }

                if (perm == null) {
                    perm = new Perm();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.