Commit 6373ceec authored by Ard Schrijvers's avatar Ard Schrijvers

CMS7-8305 Add WebResourceEvent class that is suitable to be posted to the HippoEventBus

parent 5e5fb6b2
......@@ -8,4 +8,5 @@ src/main/java/org/onehippo/cms7/services/eventbus/Subscribe.java -text
src/main/java/org/onehippo/cms7/services/googleanalytics/GoogleAnalyticsService.java -text
src/main/java/org/onehippo/cms7/services/jaxrs/JaxrsService.java -text
src/main/java/org/onehippo/cms7/services/webresources/WebResource.java -text
src/main/java/org/onehippo/cms7/services/webresources/WebResourceEvent.java -text
src/main/java/org/onehippo/cms7/services/webresources/WebResourcesService.java -text
/*
* Copyright 2014 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onehippo.cms7.services.webresources;
import java.nio.file.Path;
@SuppressWarnings("ALL")
public class WebResourceEvent {
private final Path changedPath;
private final Path watchedRootDir;
public WebResourceEvent(final Path changedPath, final Path watchedRootDir) {
this.changedPath = changedPath;
this.watchedRootDir = watchedRootDir;
}
public Path getWatchRootDir() {
return watchedRootDir;
}
public Path getChangedPath() {
return changedPath;
}
public Path getRelativeChangedPath() {
return watchedRootDir.relativize(changedPath);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment