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.webapp.helpers; 020 021import org.nuxeo.runtime.api.Framework; 022 023/** 024 * Seam event identifiers. 025 * <p> 026 * This should stay with nuxeo, since it is related to the nuxeo infrastructure. All code that depends on nuxeo 027 * infrastructure will need to depend on nuxeo anyways. NXCommon is not a good place to move this because it is used 028 * from nxruntime. It is not a good idea to add web client dependencies there. 029 * 030 * @author <a href="mailto:[email protected]">Razvan Caraghin</a> 031 */ 032public final class EventNames { 033 /** 034 * This is fired when the user selection changes. This should be listened by componens that want to do some work 035 * when the user selection changes, regardles of the type of selected document. 036 */ 037 public static final String USER_ALL_DOCUMENT_TYPES_SELECTION_CHANGED = "userAllDocumentTypesSelectionChanged"; 038 039 /** 040 * Fired when the selected domain changes. Should be listened by components interested specifically in domain 041 * selection change. 042 */ 043 public static final String DOMAIN_SELECTION_CHANGED = "domainSelectionChanged"; 044 045 /** 046 * Fired when content root selection is changed (like workspaces root, section root). 047 */ 048 public static final String CONTENT_ROOT_SELECTION_CHANGED = "contentRootSelectionChanged"; 049 050 /** 051 * Fired when a document selection changes ( file, folder etc not workspace or above ). 052 */ 053 public static final String DOCUMENT_SELECTION_CHANGED = "documentSelectionChanged"; 054 055 /** 056 * Fired when a folderish document selection changes. 057 */ 058 public static final String FOLDERISHDOCUMENT_SELECTION_CHANGED = "folderishDocumentSelectionChanged"; 059 060 /** 061 * Fired when a location selection changes. 062 */ 063 public static final String LOCATION_SELECTION_CHANGED = "locationSelectionChanged"; 064 065 /** 066 * Fired after navigating to a document, the document is passed as argument. 067 * 068 * @since 5.4.2 069 */ 070 public static final String NAVIGATE_TO_DOCUMENT = "navigateToDocument"; 071 072 /** 073 * Should be raised before an edited document is saved. 074 * 075 * @since 5.4.2 076 */ 077 public static final String BEFORE_DOCUMENT_CHANGED = "beforeDocumentChanged"; 078 079 /** 080 * Fired after a document is locked, the document is passed as argument. 081 * 082 * @since 5.4.2 083 */ 084 public static final String DOCUMENT_LOCKED = "documentLocked"; 085 086 /** 087 * Fired after a document is unlocked, the document is passed as argument. 088 * 089 * @since 5.4.2 090 */ 091 public static final String DOCUMENT_UNLOCKED = "documentUnlocked"; 092 093 /** 094 * Should be raised when a document is edited. 095 */ 096 public static final String DOCUMENT_CHANGED = "documentChanged"; 097 098 /** 099 * Should be raised when a stateful QueryModel is edited. 100 */ 101 public static final String QUERY_MODEL_CHANGED = "queryModelChanged"; 102 103 /** 104 * Should be raised when the children of the current document are modified. 105 */ 106 public static final String DOCUMENT_CHILDREN_CHANGED = "documentChildrenChanged"; 107 108 /** 109 * Should be raised when the user goes Home. This is useful to allow any components to revert to their uninitialized 110 * state if needed. 111 * <p> 112 * Ex: The tree and breadcrumb should not display anything because home is view_servers and they display what's 113 * inside a domain. 114 */ 115 public static final String GO_HOME = "goHome"; 116 117 /** 118 * Will be raised when a changeable document is created (but not saved). 119 */ 120 public static final String NEW_DOCUMENT_CREATED = "changeableDocumentCreated"; 121 122 /** 123 * Will be raised when a document is submitted for publication. 124 */ 125 public static final String DOCUMENT_SUBMITED_FOR_PUBLICATION = "documentSubmitedForPublication"; 126 127 /** 128 * This is raised when a proxy is created and need a moderation 129 */ 130 public static final String PROXY_PUSLISHING_PENDING = "proxyPublishingPending"; 131 132 public static final String DOCUMENT_UNPUBLISHED = "documentUnPublished"; 133 134 /** 135 * This is raised when a proxy has been published. 136 */ 137 public static final String PROXY_PUBLISHED = "proxyPublished"; 138 139 /** 140 * This is raised when a document is published 141 */ 142 public static final String DOCUMENT_PUBLISHED = "documentPublished"; 143 144 /** 145 * This is raised when a document publication is rejected 146 */ 147 public static final String DOCUMENT_PUBLICATION_REJECTED = "documentPublicationRejected"; 148 149 /** 150 * This is raised when a document publication is rejected 151 */ 152 public static final String DOCUMENT_PUBLICATION_APPROVED = "documentPublicationApproved"; 153 154 /** 155 * Event raised when security is changed 156 */ 157 public static final String DOCUMENT_SECURITY_CHANGED = "documentSecurityChanged"; 158 159 /** 160 * Event raised when a search is performed 161 */ 162 public static final String SEARCH_PERFORMED = "searchPerformed"; 163 164 /** 165 * Event raised when user go to his personal workspace 166 */ 167 public static final String GO_PERSONAL_WORKSPACE = "personnalWorkspace"; 168 169 /** 170 * Event raised when the local configuration of a document has changed 171 */ 172 public static final String LOCAL_CONFIGURATION_CHANGED = "localConfigurationChanged"; 173 174 /** 175 * Event raised when the content of a directory has changed 176 * 177 * @since 5.5 178 */ 179 public static final String DIRECTORY_CHANGED = "directoryChanged"; 180 181 public static final String USER_SESSION_STARTED = "org.nuxeo.ecm.web.userSessionStarted"; 182 183 /** 184 * Flush event sent to the Seam layer, only when using the dev mode, and useful for components to reset their cache 185 * smoothly: Seam components should not be destroyed completely. 186 * 187 * @since 5.6 188 * @see Framework#isDevModeSet() 189 */ 190 public static final String FLUSH_EVENT = "flush"; 191 192 /** 193 * @since 10.3 194 */ 195 public static final String MAIN_TABS_CHANGED = "mainTabsChanged"; 196 197 // Constant utility class. 198 private EventNames() { 199 } 200 201}