Examples of TurbineRole


Examples of org.apache.turbine.om.security.TurbineRole

        // Populate the object(s).
        for ( int i=0; i<rows.size(); i++ )
        {
            //Role obj = new Role();
            Role obj = new TurbineRole();
            Record row = (Record)rows.elementAt(i);
            ((TurbineRole)obj).setPrimaryKey( row.getValue(1).asInt() );
            ((TurbineRole)obj).setName( row.getValue(2).asString() );
            byte[] objectData = (byte[])row.getValue(3).asBytes();
            Map temp = (Map)ObjectUtils.deserialize(objectData);
View Full Code Here

Examples of org.apache.turbine.om.security.TurbineRole

        // Populate the object(s).
        for ( int i=0; i<rows.size(); i++ )
        {
            //Role obj = new Role();
            Role obj = new TurbineRole();
            Record row = (Record)rows.elementAt(i);
            ((TurbineRole)obj).setPrimaryKey( row.getValue(1).asInt() );
            ((TurbineRole)obj).setName( row.getValue(2).asString() );
            byte[] objectData = (byte[])row.getValue(3).asBytes();
            Map temp = (Map)ObjectUtils.deserialize(objectData);
View Full Code Here

Examples of org.apache.turbine.om.security.TurbineRole

            // Populate the object(s).
            for (int i = 0; i < rows.size(); i++)
            {
                //Role obj = new Role();
                Role obj = new TurbineRole();
                Record row = (Record) rows.get(i);
                ((TurbineRole) obj).setPrimaryKey(
                        new NumberKey(row.getValue(1).asInt()));
                ((TurbineRole) obj).setName(row.getValue(2).asString());
                byte[] objectData = (byte[]) row.getValue(3).asBytes();
View Full Code Here

Examples of org.apache.turbine.om.security.TurbineRole

     * @param roleName The name of the Group to be retrieved.
     * @return a Role.
     */
    public Role getNewRole(String roleName)
    {
        return (Role) new TurbineRole(roleName);
    }
View Full Code Here

Examples of org.apache.turbine.om.security.TurbineRole

            // Populate the object(s).
            for (int i = 0; i < rows.size(); i++)
            {
                //Role obj = new Role();
                Role obj = new TurbineRole();
                Record row = (Record) rows.get(i);
                ((TurbineRole) obj).setPrimaryKey(
                        new NumberKey(row.getValue(1).asInt()));
                ((TurbineRole) obj).setName(row.getValue(2).asString());
                byte[] objectData = row.getValue(3).asBytes();
View Full Code Here

Examples of org.apache.turbine.om.security.TurbineRole

     *
     * @param roleName The name of the Role to be retrieved.
     */
    public Role getNewRole( String roleName )
    {
        return (Role) new TurbineRole(roleName);
    }
View Full Code Here

Examples of org.apache.turbine.om.security.TurbineRole

            // Populate the object(s).
            for (int i = 0; i < rows.size(); i++ )
            {
                //Role obj = new Role();
                Role obj = new TurbineRole();
                Record row = (Record) rows.get(i);
                ((TurbineRole) obj).setPrimaryKey(row.getValue(1).asInt());
                ((TurbineRole) obj).setName(row.getValue(2).asString());
                byte[] objectData = (byte[]) row.getValue(3).asBytes();
                Map temp = (Map) ObjectUtils.deserialize(objectData);
View Full Code Here

Examples of org.campware.dream.om.TurbineRole

    protected boolean getEntry(Criteria criteria, Context context)
    {
        try
        {
            TurbineRole entry = (TurbineRole) TurbineRolePeer.doSelect(criteria).get(0);
            context.put("entry", entry);
            context.put("entryitems", entry.getTurbineRolePermissions());

            return true;
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.campware.dream.om.TurbineRole

    protected boolean getNew(Context context)
    {
        try
        {
            TurbineRole entry = new TurbineRole();
            context.put("entry", entry);

            return true;
        }
        catch (Exception e)
View Full Code Here

Examples of org.campware.dream.om.TurbineRole

     * wouldn't be secure.
     */
    public void doInsert(RunData data, Context context)
        throws Exception
    {
        TurbineRole entry = new TurbineRole();
        data.getParameters().setProperties(entry);

        ParameterParser pp= data.getParameters();
        Enumeration paramKeys= pp.keys();
       
      while(paramKeys.hasMoreElements()) {
          String paramName = paramKeys.nextElement().toString();
          if(paramName.startsWith("permissionid")) { 
              String suffix=paramName.substring(12, paramName.length());
              TurbineRolePermission entryItem= new TurbineRolePermission();

              entryItem.setPermissionId(pp.getInt("permissionid" + suffix));

              entry.addTurbineRolePermission(entryItem);
            }
        }

        entry.save();
    }
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.