001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: */
018: package org.apache.lenya.cms.observation;
019:
020: import org.apache.lenya.cms.publication.ResourceType;
021: import org.apache.lenya.cms.repository.Session;
022:
023: /**
024: * Document-related event.
025: */
026: public class DocumentEvent extends RepositoryEvent {
027:
028: private String pubId;
029: private String area;
030: private String uuid;
031: private String language;
032: private ResourceType resourceType;
033:
034: /**
035: * The change action.
036: */
037: public static final Object CHANGED = "changed";
038: /**
039: * The removal action.
040: */
041: public static final Object REMOVED = "removed";
042:
043: /**
044: * Ctor.
045: * @param session The session.
046: * @param pubId The publication ID.
047: * @param area The area.
048: * @param uuid The UUID.
049: * @param language The language.
050: * @param resourceType The resource type.
051: * @param descriptor More information about the event, for example
052: * {@link #CHANGED} or {@link #REMOVED}.
053: */
054: public DocumentEvent(Session session, String pubId, String area,
055: String uuid, String language, ResourceType resourceType,
056: Object descriptor) {
057: super (session, descriptor);
058: this .pubId = pubId;
059: this .area = area;
060: this .uuid = uuid;
061: this .language = language;
062: this .resourceType = resourceType;
063: }
064:
065: /**
066: * @return The area.
067: */
068: public String getArea() {
069: return area;
070: }
071:
072: /**
073: * @return The publication ID.
074: */
075: public String getPublicationId() {
076: return pubId;
077: }
078:
079: /**
080: * @return The UUID.
081: */
082: public String getUuid() {
083: return uuid;
084: }
085:
086: /**
087: * @return The language.
088: */
089: public String getLanguage() {
090: return language;
091: }
092:
093: /**
094: * @return The resource type.
095: */
096: public ResourceType getResourceType() {
097: return this.resourceType;
098: }
099:
100: }
|