001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 * Contributors: 017 * bstefanescu 018 */ 019package org.nuxeo.ecm.automation.core; 020 021/** 022 * @author <a href="mailto:[email protected]">Bogdan Stefanescu</a> 023 */ 024public class Constants { 025 026 /** 027 * A chain id prefix used in mysterious situations (old rest api it seems). 028 * <p> 029 * Hardcoded here to better track usage now that chains are registered as operations on the service? 030 * 031 * @since 5.9.4 032 */ 033 public static final String CHAIN_ID_PREFIX = "Chain."; 034 035 // Known input/output types 036 037 public static final String O_DOCUMENT = "document"; 038 039 public static final String O_DOCUMENTS = "documents"; 040 041 public static final String O_BLOB = "blob"; 042 043 public static final String O_BLOBS = "blobs"; 044 045 // Parameter types 046 047 // injectable as String 048 public static final String T_STRING = "string"; 049 050 // injectable as Boolean 051 public static final String T_BOOLEAN = "boolean"; 052 053 // W3C string injectable as Date 054 public static final String T_DATE = "date"; 055 056 // injectable as Integer 057 public static final String T_INTEGER = "integer"; 058 059 // injectable as Long 060 public static final String T_LONG = "long"; 061 062 // injectable as Double 063 public static final String T_FLOAT = "float"; 064 065 // injectable as URL 066 public static final String T_RESOURCE = "resource"; 067 068 // injectable as DocumentRef or DocumentModel 069 public static final String T_DOCUMENT = "document"; 070 071 // injectable as DocumentRefList / DocumentModelList 072 public static final String T_DOCUMENTS = "documents"; 073 074 public static final String T_BLOB = "blob"; 075 076 public static final String T_BLOBS = "bloblist"; 077 078 // inline MVEL injectable script as Script 079 public static final String T_SCRIPT = "script"; 080 081 // Java properties content injectable as Properties 082 public static final String T_PROPERTIES = "properties"; 083 084 // Category names 085 086 public static final String CAT_FETCH = "Fetch"; 087 088 public static final String CAT_SCRIPTING = "Scripting"; 089 090 public static final String CAT_EXECUTION = "Execution Context"; 091 092 public static final String CAT_EXECUTION_STACK = "Push & Pop"; 093 094 public static final String CAT_SUBCHAIN_EXECUTION = "Execution Flow"; 095 096 public static final String CAT_DOCUMENT = "Document"; 097 098 public static final String CAT_BLOB = "Files"; 099 100 public static final String CAT_NOTIFICATION = "Notification"; 101 102 public static final String CAT_SERVICES = "Services"; 103 104 public static final String CAT_CONVERSION = "Conversion"; 105 106 public static final String CAT_USERS_GROUPS = "Users & Groups"; 107 108 public static final String CAT_UI = "User Interface"; 109 110 public static final String CAT_LOCAL_CONFIGURATION = "Local Configuration"; 111 112 public static final String CAT_WORKFLOW = "Workflow Context"; 113 114 public static final String SEAM_CONTEXT = "Seam"; 115 116 public static final String WORKFLOW_CONTEXT = "Workflow"; 117 118 public static final String CAT_BUSINESS = "Business"; 119 120 /** 121 * @since 5.9.4 122 */ 123 public static final String CAT_CHAIN = "Chain"; 124 125 // Widget types 126 127 // the default Widget for String or any other unknown type 128 public static final String W_TEXT = "Text"; 129 130 public static final String W_MULTILINE_TEXT = "TextArea"; 131 132 public static final String W_MAIL_TEMPLATE = "MailTemplate"; 133 134 public static final String W_TEMPLATE_RESOURCE = "TemplateResource"; 135 136 // to edit a properties table 137 public static final String W_PROPERTIES = "Properties"; 138 139 // the default widget for Boolean 140 public static final String W_CHECK = "Check"; 141 142 public static final String W_RADIO = "Radio"; 143 144 // a single selection listbox 145 public static final String W_OPTION = "Option"; 146 147 public static final String W_LIST = "List"; 148 149 public static final String W_COMBO = "Combo"; 150 151 // Default widget for Date 152 public static final String W_DATE = "Date"; 153 154 // Default widget for Long 155 public static final String W_DECIMAL = "Decimal"; 156 157 // Default widget for Double 158 public static final String W_NUMBER = "Number"; 159 160 public static final String W_AUDIT_EVENT = "AuditEvent"; 161 162 // key for setting workflow variables on the operation context 163 public static final String VAR_WORKFLOW = "WorkflowVariables"; 164 165 // key for setting workflow node variables on the operation context 166 public static final String VAR_WORKFLOW_NODE = "NodeVariables"; 167 168 // key for setting chain runtime variables on the operation context 169 public static final String VAR_RUNTIME_CHAIN = "ChainParameters"; 170 171 // Configured System's line separator 172 public static final String LF = System.getProperty("line.separator"); 173 174 private Constants() { 175 } 176 177}