001/*
002 * Copyright 2008 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 */
016package org.kuali.ole.sys.document.validation.event;
017
018import org.kuali.rice.krad.bo.AdHocRouteWorkgroup;
019import org.kuali.rice.krad.document.Document;
020
021/**
022 * An attributed version (AccountingRulesEngine version) of the AddAdHocRouteWorkgroupEvent.
023 */
024public class AttributedAddAdHocRouteWorkgroupEvent extends AttributedDocumentEventBase {
025    private AdHocRouteWorkgroup adHocRouteWorkgroup;
026
027    /**
028     * Constructs an AddAdHocRouteWorkgroupEvent with the specified errorPathPrefix, document, and adHocRouteWorkgroup
029     * 
030     * @param document
031     * @param adHocRouteWorkgroup
032     * @param errorPathPrefix
033     */
034    public AttributedAddAdHocRouteWorkgroupEvent(String errorPathPrefix, Document document, AdHocRouteWorkgroup adHocRouteWorkgroup) {
035        super("creating add ad hoc route workgroup event for document " + getDocumentId(document), errorPathPrefix, document);
036        this.adHocRouteWorkgroup = adHocRouteWorkgroup;
037    }
038
039    /**
040     * Constructs an AddAdHocRouteWorkgroupEvent with the given document
041     * 
042     * @param document
043     * @param adHocRouteWorkgroup
044     */
045    public AttributedAddAdHocRouteWorkgroupEvent(Document document, AdHocRouteWorkgroup adHocRouteWorkgroup) {
046        this("", document, adHocRouteWorkgroup);
047    }
048
049    /**
050     * This method retrieves the document adHocRouteWorkgroup associated with this event.
051     * 
052     * @return AdHocRouteWorkgroup
053     */
054    public AdHocRouteWorkgroup getAdHocRouteWorkgroup() {
055        return adHocRouteWorkgroup;
056    }
057}