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