Exemplo n.º 1
0
 protected ActionForward handleSubmit(ActionMapping mapping, RequestContext ctx, Server server) {
   User user = ctx.getCurrentUser();
   RhnSet set = RhnSetDecl.setForSystemCrashes(server).get(user);
   // until we delete crash files from taskomatic, we have to delete them one by one
   for (Iterator<Long> iter =
           RhnSetDecl.setForSystemCrashes(server).get(user).getElementValues().iterator();
       iter.hasNext(); ) {
     CrashManager.deleteCrash(user, iter.next());
   }
   createSuccessMessage(ctx.getRequest(), "message.crashesdeleted", Integer.toString(set.size()));
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("sid", server.getId());
   return getStrutsDelegate().forwardParams(mapping.findForward("delete"), params);
 }
Exemplo n.º 2
0
  /** {@inheritDoc} */
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm formIn,
      HttpServletRequest request,
      HttpServletResponse response) {

    RequestContext context = new RequestContext(request);
    context.copyParamToAttributes("sid");
    Server server = context.lookupAndBindServer();

    ListRhnSetHelper helper =
        new ListRhnSetHelper(this, request, RhnSetDecl.setForSystemCrashes(server));
    helper.execute();
    if (helper.isDispatched()) {
      return handleSubmit(mapping, context, server);
    }

    SdcHelper.ssmCheck(request, server.getId(), context.getCurrentUser());

    return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
  }
Exemplo n.º 3
0
 public static void verifyRhnSetData(User user, RhnSetDecl decl, int size)
     throws HibernateException, SQLException {
   verifyRhnSetData(user.getId(), decl.getLabel(), size);
 }
 protected RhnSetDecl getSetDecl(Channel chan) {
   return RhnSetDecl.setForChannelErrata(chan);
 }