Package com.adito.policyframework

Examples of com.adito.policyframework.DefaultPolicy


     */
    public Resource createResource(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        SessionInfo sessionInfo = getSessionInfo(request);
        int selectedRealmId = sessionInfo.getRealmId();
        return new DefaultPolicy(selectedRealmId);
    }
View Full Code Here


        assertEquals("Groups are correct", original.getAttachedGroups(), updated.getAttachedGroups());
    }

    @Override
    protected Policy getDefaultResource(int selectedRealmId) {
        return new DefaultPolicy(-1, "MyNewPolicy", "A test policy.", Policy.TYPE_NORMAL, Calendar.getInstance(), Calendar
                        .getInstance(), selectedRealmId);
    }
View Full Code Here

        setResourceService(new ResourceServiceAdapter<Policy>(resourceType));
    }

    @Override
    protected Policy getDefaultResource(int selectedRealmId) {
        return new DefaultPolicy(-1, "MyNewPolicy", "A test policy.", Policy.TYPE_NORMAL, Calendar.getInstance(), Calendar
                        .getInstance(), selectedRealmId);
    }
View Full Code Here

    try {
      try {
        ps.execute();
        int id = db.getLastInsertId(ps, "createPolicy.lastInsertId");
        ps.commit();
        return new DefaultPolicy(id, name, description, type, c, c, realmID);
      } finally {
        ps.releasePreparedStatement();
      }
    } catch (Exception e) {
      ps.rollback();
View Full Code Here

        .getTime());
    Timestamp ad = rs.getTimestamp("date_amended");
    Calendar a = Calendar.getInstance();
    a.setTimeInMillis(ad == null ? System.currentTimeMillis() : ad
        .getTime());
    return new DefaultPolicy(rs.getInt("id"), rs.getString("policy_name"),
        rs.getString("policy_description"),
        rs.getInt("policy_type_id"), c, a, rs.getInt("realm_id"));
  }
View Full Code Here

TOP

Related Classes of com.adito.policyframework.DefaultPolicy

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.