001/*
002 * (C) Copyright 2006-2016 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 *     Nuxeo - initial API and implementation
018 */
019package org.nuxeo.ecm.platform.ui.web.tag.fn;
020
021import org.dom4j.DocumentFactory;
022import org.dom4j.QName;
023
024public interface LiveEditConstants {
025
026    // nxedit query parameter names
027
028    String ACTION = "action";
029
030    String DOC_TYPE = "docType";
031
032    /**
033     * @deprecated use {@link #FILENAME_PROPERTY_NAME}
034     */
035    @Deprecated
036    String FILENAME_FIELD = "filenameField";
037
038    /**
039     * @deprecated use {@link #BLOB_PROPERTY_NAME}
040     */
041    @Deprecated
042    String BLOB_FIELD = "blobField";
043
044    /**
045     * @deprecated use {@link #FILENAME_PROPERTY_NAME} and {@link #BLOB_PROPERTY_NAME}
046     */
047    @Deprecated
048    String SCHEMA = "schema";
049
050    String FILENAME_PROPERTY_NAME = "filenamePropertyName";
051
052    String BLOB_PROPERTY_NAME = "blobPropertyName";
053
054    String MIMETYPE = "mimetype";
055
056    String REPO_ID = "repoID";
057
058    String DOC_REF = "docRef";
059
060    String TEMPLATE_BLOB_FIELD = "templateBlobField";
061
062    String TEMPLATE_SCHEMA = "templateSchema";
063
064    String TEMPLATE_DOC_REF = "templateDocRef";
065
066    String TEMPLATE_REPO_ID = "templateRepoID";
067
068    // action values
069
070    String ACTION_EDIT_DOCUMENT = "edit";
071
072    String ACTION_CREATE_DOCUMENT = "create";
073
074    String ACTION_CREATE_DOCUMENT_FROM_TEMPLATE = "createFromTemplate";
075
076    // default fields to store LiveEditable blobs and related fields
077
078    String DEFAULT_DOCTYPE = "File";
079
080    // to be deprecated once all filenames are stored in the blob itself
081    /**
082     * @deprecated since 9.1 filename is now stored in the blob itself
083     */
084    @Deprecated
085    String DEFAULT_FILENAME_FIELD = "filename";
086
087    String DEFAULT_BLOB_FIELD = "content";
088
089    String DEFAULT_SUB_BLOB_FIELD = "file";
090
091    String DEFAULT_SCHEMA = "file";
092
093    // XML QNames for the Bootstrap XML and RESTful web service responses
094
095    String XML_LE_NAMESPACE = "http://www.nuxeo.org/liveEdit";
096
097    QName actionSelectorTag = DocumentFactory.getInstance().createQName("actionSelector");
098
099    QName liveEditTag = DocumentFactory.getInstance().createQName("liveEdit");
100
101    QName editIdTag = DocumentFactory.getInstance().createQName("editId");
102
103    QName documentTag = DocumentFactory.getInstance().createQName("document");
104
105    QName templateDocumentTag = DocumentFactory.getInstance().createQName("template");
106
107    QName docRefTag = DocumentFactory.getInstance().createQName("docRef");
108
109    QName docTitleTag = DocumentFactory.getInstance().createQName("docTitle");
110
111    QName docPathTag = DocumentFactory.getInstance().createQName("docPath");
112
113    QName docRepositoryTag = DocumentFactory.getInstance().createQName("repository");
114
115    /**
116     * @deprecated use docBlobFieldNameTag instead
117     */
118    @Deprecated
119    QName docFieldNameTag = DocumentFactory.getInstance().createQName("fieldName");
120
121    /**
122     * @deprecated use docBlobFieldPathTag instead
123     */
124    @Deprecated
125    QName docfieldPathTag = DocumentFactory.getInstance().createQName("fieldPath");
126
127    QName docBlobFieldNameTag = DocumentFactory.getInstance().createQName("blobFieldName");
128
129    QName docBlobFieldPathTag = DocumentFactory.getInstance().createQName("blobFieldPath");
130
131    QName docFilenameFieldNameTag = DocumentFactory.getInstance().createQName("filenameFieldName");
132
133    QName docFilenameFieldPathTag = DocumentFactory.getInstance().createQName("filenameFieldPath");
134
135    QName docSchemaNameTag = DocumentFactory.getInstance().createQName("schemaName");
136
137    QName docfileNameTag = DocumentFactory.getInstance().createQName("fileName");
138
139    QName docTypeTag = DocumentFactory.getInstance().createQName("type");
140
141    QName docMimetypeTag = DocumentFactory.getInstance().createQName("mimetype");
142
143    QName docFileExtensionTag = DocumentFactory.getInstance().createQName("fileExtension");
144
145    QName docFileAuthorizedExtensionsTag = DocumentFactory.getInstance().createQName(
146            "authorizedExtensions");
147
148    QName docFileAuthorizedExtensionTag = DocumentFactory.getInstance().createQName("extension");
149
150    QName docIsVersionTag = DocumentFactory.getInstance().createQName("isVersion");
151
152    QName docIsLockedTag = DocumentFactory.getInstance().createQName("isLocked");
153
154    QName requestInfoTag = DocumentFactory.getInstance().createQName("requestInfo");
155
156    QName requestCookiesTag = DocumentFactory.getInstance().createQName("cookies");
157
158    QName requestCookieTag = DocumentFactory.getInstance().createQName("cookie");
159
160    QName requestHeadersTag = DocumentFactory.getInstance().createQName("headers");
161
162    QName requestHeaderTag = DocumentFactory.getInstance().createQName("header");
163
164    QName requestBaseURLTag = DocumentFactory.getInstance().createQName("baseURL");
165
166    QName userInfoTag = DocumentFactory.getInstance().createQName("userInfo");
167
168    QName userNameTag = DocumentFactory.getInstance().createQName("userName");
169
170    QName userPasswordTag = DocumentFactory.getInstance().createQName("userPassword");
171
172    QName userTokenTag = DocumentFactory.getInstance().createQName("userToken");
173
174    QName userLocaleTag = DocumentFactory.getInstance().createQName("userLocale");
175
176    QName wsdlLocationsTag = DocumentFactory.getInstance().createQName("wsdlLocations");
177
178    QName wsdlAccessWebServiceTag = DocumentFactory.getInstance().createQName("wsdlAccessWS");
179
180    QName wsdlLEWebServiceTag = DocumentFactory.getInstance().createQName("wsdlLiveEditWS");
181
182    QName serverInfoTag = DocumentFactory.getInstance().createQName("serverInfo");
183
184    QName serverVersionTag = DocumentFactory.getInstance().createQName("serverVersion");
185
186    String URL_ENCODE_CHARSET = "UTF-8";
187
188}