public String cancel() throws Exception {
  if (resource == null) {
    return NOT_FOUND;
  }
  boolean cancelled=resourceManager.cancelPublishing(resource.getShortname(),this);
  if (cancelled) {
    BigDecimal version=resource.getEmlVersion();
    String msg=getText("publishing.cancelled",new String[]{version.toPlainString(),resource.getShortname()});
    LOG.warn(msg);
    addActionError(msg);
    resourceManager.restoreVersion(resource,version,this);
    StatusReport tmpReport=new StatusReport(true,GenerateDwca.CANCELLED_STATE_MSG,report.getMessages());
    report=tmpReport;
    return execute();
  }
  addActionError(getText("manage.overview.failed.stop.publishing"));
  return ERROR;
}

public String cancel ( ) throws Exception { if ( resource == null ) { return NOT_FOUND ; } boolean cancelled = resourceManager . cancelPublishing ( resource . getShortname ( ) , this ) ; if ( cancelled ) { BigDecimal version = resource . getEmlVersion ( ) ; String msg = getText ( "publishing.cancelled" , new String [ ] { version . toPlainString ( ) , resource . getShortname ( ) } ) ; LOG . warn ( msg ) ; addActionError ( msg ) ; resourceManager . restoreVersion ( resource , version , this ) ; StatusReport tmpReport = new StatusReport ( true , GenerateDwca . CANCELLED_STATE_MSG , report . getMessages ( ) ) ; report = tmpReport ; return execute ( ) ; } addActionError ( getText ( "manage.overview.failed.stop.publishing" ) ) ; return ERROR ; }
cancel resource publication . publication is all or nothing . if incomplete , the version number of the resource must be rolled back .
