001/**
002 * Copyright 2005-2016 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.rice.kew.api.document;
017
018import java.util.Map;
019
020import org.joda.time.DateTime;
021
022/**
023 * Provides read-only access to Document meta-data.
024 */
025public interface DocumentContract {
026
027    /**
028     * Retrieve the document id
029     * @return the document id
030     */
031    String getDocumentId();
032
033    /**
034     * Retrieve the document status
035     * @return the document status
036     */
037    DocumentStatus getStatus();
038
039    /**
040     * Retrieve the document creation date
041     * @return the document creation date or null
042     */
043    DateTime getDateCreated();
044
045    /**
046     * Retrieve the document last-modified date
047     * @return the document last-modified date or null
048     */
049    DateTime getDateLastModified();
050
051    /**
052     * Retrieve the document approval date
053     * @return the document approval date or null
054     */
055    DateTime getDateApproved();
056
057    /**
058     * Retrieve the document finalization date
059     * @return the document finalization date or null
060     */
061    DateTime getDateFinalized();
062
063    /**
064     * Retrieve the document title
065     * @return the document title
066     */
067    String getTitle();
068
069    /**
070     * Retrieve the application document id.  The Application Document Id is used to record an application-relevant
071     * id for the workflow document.
072     * @return the application document id
073     */
074    String getApplicationDocumentId();
075
076    /**
077     * Retrieve the initiator principal id
078     * @return the initiator principal id
079     */
080    String getInitiatorPrincipalId();
081
082    /**
083     * Retrieve the router principal id
084     * @return the router principal id
085     */
086    String getRoutedByPrincipalId();
087
088    /**
089     * Retrieve the name of the type of this document
090     * @return the name of the type of this document
091     */
092    String getDocumentTypeName();
093
094    /**
095     * Retrieve the id of the type of this document
096     * @return the id of the type of this document
097     */
098    String getDocumentTypeId();
099
100    /**
101     * Retrieve the document handler url
102     * @return the document handler url
103     */
104    String getDocumentHandlerUrl();
105
106    /**
107     * Retrieve the application document status. The Application Document Status is used
108     * to track document/applicaiton specific statuses
109     * @return the application document status
110     */
111    String getApplicationDocumentStatus();
112
113    /**
114     * Retrieve the last application document status transition date.  The Application Document Status date is
115     * the date the application document status last transitioned.
116     * @return the application document status date
117     */
118    DateTime getApplicationDocumentStatusDate();
119
120    /**
121     * Retrieve the currently defined internal workflow engine variables for the document
122     * NOTE: use of workflow engine variables is an advanced technique requiring specific crafting of the
123     * workflow document routing; these variables will not be useful for the majority of workflow use cases
124     * @return the currently defined workflow engine variables for the document
125     */
126    Map<String, String> getVariables();
127}