Пример #1
0
  @BeforeClass
  @Override
  public void setup() throws Exception {
    super.setup();
    Application appl =
        ApplicationManager.newApplication(
            "/",
            APPL_NAME,
            ApplicationTypeManager.getAppplicationType(
                adminSubject, ApplicationTypeManager.URL_APPLICATION_TYPE_NAME));

    Map<String, Boolean> actions = new HashMap<String, Boolean>();
    actions.put("GET", true);
    appl.setActions(actions);
    appl.setEntitlementCombiner(DenyOverride.class);

    ApplicationManager.saveApplication(adminSubject, "/", appl);
  }
Пример #2
0
 /**
  * Wrapper for the static method {@link ApplicationManager#saveApplication(Subject, String,
  * Application)}.
  *
  * @param adminSubject An admin-level {@link Subject}.
  * @param realm The realm in which to save the {@link Application}
  * @param application The {@link Application} to save
  * @throws EntitlementException If there was an issue saving the application
  */
 public void saveApplication(Subject adminSubject, String realm, Application application)
     throws EntitlementException {
   ApplicationManager.saveApplication(adminSubject, realm, application);
 }