Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package org.kuali.rice.kew.actions;
Simply records an action taken with an annotation.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
public class LogDocumentActionAction extends ActionTakenEvent {
    private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(LogDocumentActionAction.class);

    

Parameters:
rh RouteHeader for the document upon which the action is taken.
principal User taking the action.
        super(.rhprincipal);
    }

    

Parameters:
rh RouteHeader for the document upon which the action is taken.
principal User taking the action.
annotation User comment on the action taken
    public LogDocumentActionAction(DocumentRouteHeaderValue rhPrincipalContract principalString annotation) {
        super(.rhprincipalannotation);
    }
    /* (non-Javadoc)
     * @see org.kuali.rice.kew.actions.ActionTakenEvent#validateActionRules()
     */
    @Override
    public String validateActionRules() {
        // log action is always valid so return no error message
        return "";
    }

    
Records the non-routed document action. - Checks to make sure the document status allows the action. Records the action.

    public void recordAction() throws InvalidActionTakenException {
        MDC.put("docId"getRouteHeader().getDocumentId());
        String errorMessage = validateActionRules();
        if (!org.apache.commons.lang.StringUtils.isEmpty(errorMessage)) {
            throw new InvalidActionTakenException(errorMessage);
        }
        .debug("Logging document action");
        ActionTakenValue actionTaken = saveActionTaken(.);
        // LogDocumentAction should not contact the PostProcessor which is why we don't call notifyActionTaken
       
    }
	public String validateActionRules(List<ActionRequestValueactionRequests) {
        // log action is always valid so return no error message
		return "";
	}
New to GrepCode? Check out our FAQ X