001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     * http://www.opensource.org/licenses/ecl2.php
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.kfs.sys.document.validation.event;
017    
018    import org.kuali.rice.kns.document.Document;
019    
020    /**
021     * An attributed version of the Approve Document event.
022     */
023    public class AttributedApproveDocumentEvent extends AttributedDocumentEventBase {
024        /**
025         * Constructs an ApproveDocumentEvent with the specified errorPathPrefix and document
026         * 
027         * @param errorPathPrefix
028         * @param document
029         */
030        public AttributedApproveDocumentEvent(String errorPathPrefix, Document document) {
031            this("approve", errorPathPrefix, document);
032        }
033    
034        /**
035         * Constructs an ApproveDocumentEvent with the given document
036         * 
037         * @param document
038         */
039        public AttributedApproveDocumentEvent(Document document) {
040            this("approve", "", document);
041        }
042    
043        /**
044         * Constructs a ApproveDocumentEvent, allowing the eventType to be passed in so that subclasses can specify a more accurate
045         * message.
046         * 
047         * @param eventType
048         * @param errorPathPrefix
049         * @param document
050         */
051        protected AttributedApproveDocumentEvent(String eventType, String errorPathPrefix, Document document) {
052            super("creating " + eventType + " event for document " + getDocumentId(document), errorPathPrefix, document);
053        }
054    }