Skip to content

Commit 848d6f9

Browse files
authored
Create model interface representing file change (eclipse-che#6681)
* Replace abstract method with default implementation Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com> * Replace abstract method with default implementation Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com> * Fix formatting issue Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com> * Create model interface representing file change Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
1 parent 21e73d4 commit 848d6f9

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2012-2017 Red Hat, Inc.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* Red Hat, Inc. - initial API and implementation
10+
*/
11+
package org.eclipse.che.api.project.shared;
12+
13+
import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType;
14+
15+
/**
16+
* Entity which describes change occurred to the specific path.
17+
*
18+
* @author Vlad Zhukovskyi
19+
* @since 5.19.0
20+
*/
21+
public interface FileChange {
22+
String getPath();
23+
24+
FileWatcherEventType getType();
25+
}

wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/FileWatcherEventType.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
*/
1111
package org.eclipse.che.api.project.shared.dto.event;
1212

13-
/** @author andrew00x */
13+
/**
14+
* todo(vzhukovskyi): need to move this enumeration outside from dto package
15+
*
16+
* @author andrew00x
17+
*/
1418
public enum FileWatcherEventType {
1519
CREATED,
1620
DELETED,

wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/ProjectTreeStateUpdateDto.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
*/
1111
package org.eclipse.che.api.project.shared.dto.event;
1212

13+
import org.eclipse.che.api.project.shared.FileChange;
1314
import org.eclipse.che.dto.shared.DTO;
1415

1516
@DTO
16-
public interface ProjectTreeStateUpdateDto {
17+
public interface ProjectTreeStateUpdateDto extends FileChange {
1718
String getPath();
1819

1920
ProjectTreeStateUpdateDto withPath(String path);

0 commit comments

Comments
 (0)