Package ariba.ui.meta.persistence

Examples of ariba.ui.meta.persistence.ObjectContext.create()


    }

    public static Global create (String key)
    {
        ObjectContext context = ObjectContext.get();
        Global global = context.create(Global.class);
        global.key = key;
        global.modified();
        return global;
    }
View Full Code Here


    }

    public static User create (String email, String fullName)
    {
        ObjectContext context = ObjectContext.get();
        User user = context.create(User.class);
        user.email = email;
        user.name = fullName;
        return user;
    }
View Full Code Here

                permissionsByPackage.put(pkg,permissionsForClass);
            }

            for (Permission.ClassOperation op : Permission.ClassOperation.values()) {
                String permName = Permission.nameForClassOp(className, op);
                Permission permission = ctx.create(Permission.class);
                permission.setName(permName);
                permissionsForClass.add(permission);
            }
            ctx.save();
        }
View Full Code Here

        }

        // Groups for every package
        List<Group>pkgGroups = ListUtil.list();
        for (Map.Entry<String, Set<Permission>> e : permissionsByPackage.entrySet()) {
            Group group = ctx.create(Group.class);
            group.setName(Fmt.S("%s:ALL", e.getKey()));
            group.setPermissions(e.getValue());
            pkgGroups.add(group);
        }
View Full Code Here


    static void createDefaultUsers ()
    {
        ObjectContext ctx = ObjectContext.get();
        User admin = ctx.create(User.class);
        admin.setName(User.AdminName);
        admin.setPassword("ariba");
        Group adminGroup = getDefaultGroup(Group.DefaultGroup.AdminUsers);
        admin.setMemberOf(AWUtil.list(adminGroup));
View Full Code Here

        admin.setName(User.AdminName);
        admin.setPassword("ariba");
        Group adminGroup = getDefaultGroup(Group.DefaultGroup.AdminUsers);
        admin.setMemberOf(AWUtil.list(adminGroup));

        User anonymous = ctx.create(User.class);
        anonymous.setName(User.AnonymousName);
        Group anonGroup = getDefaultGroup(Group.DefaultGroup.AnonymousUsers);
        anonymous.setMemberOf(AWUtil.list(anonGroup));
        anonymous.setPassword("");
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.