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 java.util.Map;
019    
020    import org.kuali.rice.kns.bo.AdHocRoutePerson;
021    import org.kuali.rice.kns.document.Document;
022    
023    
024    public class AttributedAddAdHocRoutePersonEvent extends AttributedDocumentEventBase implements AttributedDocumentEvent {
025        Map<String, Object> attributes;
026        private AdHocRoutePerson adHocRoutePerson;
027        
028        /**
029         * Constructs an AddAdHocRoutePersonEvent with the specified errorPathPrefix, document, and adHocRoutePerson
030         * 
031         * @param document
032         * @param adHocRoutePerson
033         * @param errorPathPrefix
034         */
035        public AttributedAddAdHocRoutePersonEvent(String errorPathPrefix, Document document, AdHocRoutePerson adHocRoutePerson) {
036            super("creating add ad hoc route person event for document " + getDocumentId(document), errorPathPrefix, document);
037            this.adHocRoutePerson = adHocRoutePerson;
038        }
039    
040        /**
041         * Constructs an AddAdHocRoutePersonEvent with the given document
042         * 
043         * @param document
044         * @param adHocRoutePerson
045         */
046        public AttributedAddAdHocRoutePersonEvent(Document document, AdHocRoutePerson adHocRoutePerson) {
047            this("", document, adHocRoutePerson);
048        }
049    
050        /**
051         * This method retrieves the document adHocRoutePerson associated with this event.
052         * 
053         * @return AdHocRoutePerson
054         */
055        public AdHocRoutePerson getAdHocRoutePerson() {
056            return adHocRoutePerson;
057        }
058    }