1 /** 2 * Copyright 2005-2014 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.rice.kew.api.document; 17 18 import java.util.Map; 19 20 import org.joda.time.DateTime; 21 22 /** 23 * Provides read-only access to Document meta-data. 24 */ 25 public interface DocumentContract { 26 27 /** 28 * Retrieve the document id 29 * @return the document id 30 */ 31 String getDocumentId(); 32 33 /** 34 * Retrieve the document status 35 * @return the document status 36 */ 37 DocumentStatus getStatus(); 38 39 /** 40 * Retrieve the document creation date 41 * @return the document creation date or null 42 */ 43 DateTime getDateCreated(); 44 45 /** 46 * Retrieve the document last-modified date 47 * @return the document last-modified date or null 48 */ 49 DateTime getDateLastModified(); 50 51 /** 52 * Retrieve the document approval date 53 * @return the document approval date or null 54 */ 55 DateTime getDateApproved(); 56 57 /** 58 * Retrieve the document finalization date 59 * @return the document finalization date or null 60 */ 61 DateTime getDateFinalized(); 62 63 /** 64 * Retrieve the document title 65 * @return the document title 66 */ 67 String getTitle(); 68 69 /** 70 * Retrieve the application document id. The Application Document Id is used to record an application-relevant 71 * id for the workflow document. 72 * @return the application document id 73 */ 74 String getApplicationDocumentId(); 75 76 /** 77 * Retrieve the initiator principal id 78 * @return the initiator principal id 79 */ 80 String getInitiatorPrincipalId(); 81 82 /** 83 * Retrieve the router principal id 84 * @return the router principal id 85 */ 86 String getRoutedByPrincipalId(); 87 88 /** 89 * Retrieve the name of the type of this document 90 * @return the name of the type of this document 91 */ 92 String getDocumentTypeName(); 93 94 /** 95 * Retrieve the id of the type of this document 96 * @return the id of the type of this document 97 */ 98 String getDocumentTypeId(); 99 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 }