diff --git a/core/ide/che-core-ide-api/pom.xml b/core/ide/che-core-ide-api/pom.xml
index 057556e3f8..83d2585cfa 100644
--- a/core/ide/che-core-ide-api/pom.xml
+++ b/core/ide/che-core-ide-api/pom.xml
@@ -56,7 +56,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/core/ide/che-core-ide-app/pom.xml b/core/ide/che-core-ide-app/pom.xml
index 860072e960..5f2115bb0b 100644
--- a/core/ide/che-core-ide-app/pom.xml
+++ b/core/ide/che-core-ide-app/pom.xml
@@ -81,7 +81,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/core/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImportWizardRegistrar.java b/core/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImportWizardRegistrar.java
index 671af60a9e..243f0767b9 100644
--- a/core/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImportWizardRegistrar.java
+++ b/core/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/zip/ZipImportWizardRegistrar.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.che.ide.projectimport.zip;
-import org.eclipse.che.api.project.server.ZipProjectImporter;
+import org.eclipse.che.api.project.shared.Constants;
import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto;
import org.eclipse.che.ide.api.project.wizard.ImportWizardRegistrar;
import org.eclipse.che.ide.api.wizard.WizardPage;
@@ -38,7 +38,7 @@ public class ZipImportWizardRegistrar implements ImportWizardRegistrar {
@NotNull
public String getImporterId() {
- return ZipProjectImporter.ID;
+ return Constants.ZIP_IMPORTER_ID;
}
@NotNull
diff --git a/core/platform-api-client-gwt/che-core-client-gwt-project/pom.xml b/core/platform-api-client-gwt/che-core-client-gwt-project/pom.xml
index 859bea220c..939f538821 100644
--- a/core/platform-api-client-gwt/che-core-client-gwt-project/pom.xml
+++ b/core/platform-api-client-gwt/che-core-client-gwt-project/pom.xml
@@ -56,7 +56,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/plugins/plugin-git/che-plugin-git-ext-git/pom.xml b/plugins/plugin-git/che-plugin-git-ext-git/pom.xml
index 7c10065847..2e1ac6c3cf 100644
--- a/plugins/plugin-git/che-plugin-git-ext-git/pom.xml
+++ b/plugins/plugin-git/che-plugin-git-ext-git/pom.xml
@@ -59,7 +59,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/plugins/plugin-github/che-plugin-github-ide/pom.xml b/plugins/plugin-github/che-plugin-github-ide/pom.xml
index 6e1c785435..50c08d949e 100644
--- a/plugins/plugin-github/che-plugin-github-ide/pom.xml
+++ b/plugins/plugin-github/che-plugin-github-ide/pom.xml
@@ -47,7 +47,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml b/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml
index e91e076db5..4982afcae9 100644
--- a/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml
+++ b/plugins/plugin-java/che-plugin-java-ext-lang-client/pom.xml
@@ -52,7 +52,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/plugins/plugin-machine/che-plugin-machine-ext-client/pom.xml b/plugins/plugin-machine/che-plugin-machine-ext-client/pom.xml
index 20fd0ef283..1d3aef9669 100644
--- a/plugins/plugin-machine/che-plugin-machine-ext-client/pom.xml
+++ b/plugins/plugin-machine/che-plugin-machine-ext-client/pom.xml
@@ -155,7 +155,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
test
diff --git a/plugins/plugin-maven/che-plugin-maven-ide/pom.xml b/plugins/plugin-maven/che-plugin-maven-ide/pom.xml
index 4c4fbe9d91..71319b9dfd 100644
--- a/plugins/plugin-maven/che-plugin-maven-ide/pom.xml
+++ b/plugins/plugin-maven/che-plugin-maven-ide/pom.xml
@@ -54,7 +54,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenClassPathConfigurator.java b/plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenClassPathConfigurator.java
index f69702d852..9b56d0ee95 100644
--- a/plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenClassPathConfigurator.java
+++ b/plugins/plugin-maven/che-plugin-maven-server/src/main/java/org/eclipse/che/plugin/maven/server/projecttype/MavenClassPathConfigurator.java
@@ -19,7 +19,7 @@ import org.eclipse.che.ide.maven.tools.Model;
import java.io.ByteArrayInputStream;
-import static org.eclipse.che.api.project.server.Constants.CODENVY_DIR;
+import static org.eclipse.che.api.project.shared.Constants.CODENVY_DIR;
import static org.eclipse.che.plugin.maven.shared.MavenAttributes.DEFAULT_SOURCE_FOLDER;
import static org.eclipse.che.plugin.maven.shared.MavenAttributes.DEFAULT_TEST_SOURCE_FOLDER;
diff --git a/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml b/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml
index efdb8a4385..2594d5370a 100644
--- a/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml
+++ b/plugins/plugin-svn/che-plugin-svn-ext-ide/pom.xml
@@ -48,7 +48,7 @@
org.eclipse.che.core
- che-core-api-project
+ che-core-api-project-shared
org.eclipse.che.core
diff --git a/pom.xml b/pom.xml
index 5553331770..d78e7ed44a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -145,6 +145,11 @@
che-core-api-project
${project.version}
+
+ org.eclipse.che.core
+ che-core-api-project-shared
+ ${project.version}
+
org.eclipse.che.core
che-core-api-ssh
diff --git a/wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConfigurationChecker.java b/wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConfigurationChecker.java
index fe1b3ec388..d9723a997b 100644
--- a/wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConfigurationChecker.java
+++ b/wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConfigurationChecker.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.che.api.git;
-import org.eclipse.che.api.project.server.Constants;
+import org.eclipse.che.api.project.shared.Constants;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
diff --git a/wsagent/che-core-api-project-share/pom.xml b/wsagent/che-core-api-project-share/pom.xml
deleted file mode 100644
index 130f6b0404..0000000000
--- a/wsagent/che-core-api-project-share/pom.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
- 4.0.0
-
- che-agent-parent
- org.eclipse.che.core
- 4.3.0-RC1-SNAPSHOT
-
- che-core-api-project-shared
- jar
- Che Core :: API :: Project Shared
-
- ${project.build.directory}/generated-sources/dto/
- false
-
-
-
- com.google.code.gson
- gson
-
-
- com.google.guava
- guava
-
-
- io.swagger
- swagger-annotations
-
-
- javax.annotation
- javax.annotation-api
-
-
- javax.validation
- validation-api
-
- org.eclipse.che.core
- che-core-api-core
-
-
- org.eclipse.che.core
- che-core-api-dto
-
-
- org.eclipse.che.core
- che-core-api-model
-
-
- org.eclipse.che.core
- che-core-api-workspace-shared
-
-
- org.eclipse.che.core
- che-core-commons-annotations
-
-
- org.eclipse.che.core
- che-core-commons-json
- test
-
-
-
-
-
- src/main/java
-
-
- src/main/resources
-
-
- ${generated.sources.directory}
-
-
-
-
- org.eclipse.che.core
- che-core-api-dto-maven-plugin
- ${project.version}
-
-
- process-sources
-
- generate
-
-
-
-
-
- org.eclipse.che.core
- che-core-api-project
- ${project.version}
-
-
-
-
- org.eclipse.che.api.project.shared.dto
-
- ${dto-generator-out-directory}
- org.eclipse.che.api.project.server.dto.DtoServerImpls
- server
-
-
-
- maven-compiler-plugin
-
-
- pre-compile
- generate-sources
-
- compile
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
-
-
- add-resource
- process-sources
-
- add-resource
-
-
-
-
- ${dto-generator-out-directory}/META-INF
- META-INF
-
-
-
-
-
- add-source
- process-sources
-
- add-source
-
-
-
- ${dto-generator-out-directory}
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- **/FileTreeWatcherMassiveIoOperationTest.java
- **/FileTreeWatcherTest.java
-
-
-
-
-
-
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/Constants.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/Constants.java
deleted file mode 100644
index a215777fdb..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/Constants.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared;
-
-/**
- * @author Vitalii Parfonov
- */
-public class Constants {
-
- public static final String BLANK_ID = "blank";
- public static final String VCS_PROVIDER_NAME = "vcs.provider.name";
-
- private Constants() {
- }
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java
deleted file mode 100644
index ee8b5efe56..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-
-/**
- * Data transfer object (DTO) for org.eclipse.che.api.project.shared.AttributeDescription
- *
- * @author andrew00x
- */
-@DTO
-public interface AttributeDescriptor {
- String getName();
-
- void setName(String name);
-
- AttributeDescriptor withName(String name);
-
- String getDescription();
-
- void setDescription(String description);
-
- AttributeDescriptor withDescription(String description);
-
- boolean getRequired();
-
- void setRequired(boolean required);
-
- AttributeDescriptor withRequired(boolean required);
-
- boolean getVariable();
-
- void setVariable(boolean variable);
-
- AttributeDescriptor withVariable(boolean variable);
-
- List getValues();
-
- void setValues(List values);
-
- AttributeDescriptor withValues(List values);
-
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java
deleted file mode 100644
index f850b31ea8..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.api.core.model.project.type.Attribute;
-import org.eclipse.che.dto.shared.DTO;
-
-/**
- * Data transfer object (DTO) for org.eclipse.che.api.project.shared.AttributeDescription
- *
- * @author andrew00x
- */
-@DTO
-public interface AttributeDto extends Attribute {
-
- @Override
- String getName();
-
- AttributeDto withName(String name);
-
- @Override
- String getDescription();
-
- AttributeDto withDescription(String description);
-
- @Override
- boolean isRequired();
-
- AttributeDto withRequired(boolean required);
-
- @Override
- boolean isVariable();
-
- AttributeDto withVariable(boolean variable);
-
- @Override
- ValueDto getValue();
-
- AttributeDto withValue(ValueDto value);
-
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java
deleted file mode 100644
index f46f7e2519..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import com.google.common.annotations.Beta;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.eclipse.che.dto.shared.DTO;
-
-/**
- *
- * @author Ori Libhaber
- */
-@Beta
-@DTO
-public interface CopyOptions {
- /**
- * Get value of overWrite attribute
- * @return overWrite attribute
- */
- @ApiModelProperty(value = "Overwrite if there's a conflict with file names", allowableValues = "true, false")
- Boolean getOverWrite();
- /**
- * Set value of overWrite attribute
- * @param overWrite is the value to set to overWrite attribute
- */
- void setOverWrite(Boolean overWrite);
- /**
- * Get value of name attribute
- * @return name attribute
- */
- @ApiModelProperty("New file name")
- String getName();
- /**
- * Set value of name attribute
- * @param name is the value to set to name attribute
- */
- void setName(String name);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java
deleted file mode 100644
index ced7d7a475..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.dto.shared.DTO;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.util.Map;
-
-/**
- * Data transfer object (DTO) for generate project.
- *
- * @author Vladyslav Zhukovskiy
- */
-@DTO
-@ApiModel(description = "Generate new project")
-public interface GeneratorDescription {
-
- /** Get options needed for generator. */
- @ApiModelProperty("Options needed for generator")
- Map getOptions();
-
- /** Set options needed for generator. */
- void setOptions(Map options);
-
- GeneratorDescription withOptions(Map options);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java
deleted file mode 100644
index 4ff7b652a9..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.api.core.rest.shared.dto.Hyperlinks;
-import org.eclipse.che.api.core.rest.shared.dto.Link;
-import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto;
-import org.eclipse.che.commons.annotation.Nullable;
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author andrew00x
- */
-@DTO
-public interface ItemReference extends Hyperlinks {
- /** Get name of item. */
- String getName();
-
- /** Set name of item. */
- void setName(String name);
-
- ItemReference withName(String name);
-
- /** Get type of item, e.g. "file", "folder" or "project". */
- String getType();
-
- /** Set type of item, e.g. "file" or "folder" or "project". */
- void setType(String type);
-
- ItemReference withType(String type);
-
- /** Get project path. */
- String getProject();
-
- ItemReference withProject(String project);
-
- /** Get path of item. */
- String getPath();
-
- /** Set path of item. */
- void setPath(String path);
-
- ItemReference withPath(String path);
-
- ItemReference withLinks(List links);
-
- /**
- * Attributes
- */
- Map getAttributes();
-
- void setAttributes(Map attributes);
-
- ItemReference withAttributes(Map attributes);
-
-
- /** last modified date. */
- long getModified();
-
- void setModified(long modified);
-
- ItemReference withModified(long modified);
-
-
- /** content length for file */
- long getContentLength();
-
- void setContentLength(long length);
-
- ItemReference withContentLength(long length);
-
- /** The method can return {@code null} value. {@link ProjectConfigDto} exist only for project and modules in other cases it is null. */
- @Nullable
- ProjectConfigDto getProjectConfig();
-
- void setProjectConfig(ProjectConfigDto config);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java
deleted file mode 100644
index ea648d007b..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import com.google.common.annotations.Beta;
-
-import io.swagger.annotations.ApiModelProperty;
-import org.eclipse.che.dto.shared.DTO;
-
-/**
- *
- * @author Ori Libhaber
- */
-@Beta
-@DTO
-public interface MoveOptions {
- /**
- * Get value of overWrite attribute
- * @return overWrite attribute
- */
- @ApiModelProperty(value = "Overwrite if there's a conflict with file names", allowableValues = "true, false")
- Boolean getOverWrite();
- /**
- * Set value of overWrite attribute
- * @param overWrite is the value to set to overWrite attribute
- */
- void setOverWrite(Boolean overWrite);
- /**
- * Get value of name attribute
- * @return name attribute
- */
- @ApiModelProperty("New file name")
- String getName();
- /**
- * Set value of name attribute
- * @param name is the value to set to name attribute
- */
- void setName(String name);
-
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java
deleted file mode 100644
index 9f3c855c4b..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Class for transfering project importers and general configuration
- *
- * @author Michail Kuznyetsov
- */
-@DTO
-public interface ProjectImporterData {
-
- List getImporters();
-
- void setImporters(List importers);
-
- ProjectImporterData withImporters(List importers);
-
- Map getConfiguration();
-
- void setConfiguration(Map configuration);
-
- ProjectImporterData withConfiguration(Map configuration);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java
deleted file mode 100644
index e403b1addb..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.Map;
-
-/**
- * @author Vitaly Parfonov
- */
-@DTO
-public interface ProjectImporterDescriptor {
-
- String getId();
-
- void setId(String id);
-
- ProjectImporterDescriptor withId(String id);
-
- /**
- * @return importer's category (example: source control, archive)
- */
- String getCategory();
-
- /**
- * @param category importer's category (example: source control, archive)
- */
- void setCategory(String category);
-
- ProjectImporterDescriptor withCategory(String category);
-
-
- /**
- * @return true if this importer uses only internal und not accessible for users call
- * otherwise false
- */
- boolean isInternal();
-
- /**
- * set true if this importer uses only internal und not accessible for users call
- * otherwise false
- */
- void setInternal(boolean isInternal);
-
- ProjectImporterDescriptor withInternal(boolean isInternal);
-
- /** Get description of project importer. */
- String getDescription();
-
- /** Set description of project importer. */
- void setDescription(String description);
-
- ProjectImporterDescriptor withDescription(String description);
-
- /** Gets attributes of this project importer. */
- Map getAttributes();
-
- /** Sets attributes for this project importer. */
- void setAttributes(Map attributes);
-
- ProjectImporterDescriptor withAttributes(Map attributes);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTemplateDescriptor.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTemplateDescriptor.java
deleted file mode 100644
index 2023a5b312..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTemplateDescriptor.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.api.core.rest.shared.dto.Link;
-import org.eclipse.che.api.machine.shared.dto.CommandDto;
-import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto;
-import org.eclipse.che.api.workspace.shared.dto.ProjectProblemDto;
-import org.eclipse.che.api.workspace.shared.dto.SourceStorageDto;
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-import java.util.Map;
-
-/** @author Vitaly Parfonov */
-@DTO
-public interface ProjectTemplateDescriptor {
-
- String getName();
-
- void setName(String name);
-
- ProjectTemplateDescriptor withName(String name);
-
- String getPath();
-
- void setPath(String path);
-
- ProjectTemplateDescriptor withPath(String path);
-
- /** Get description of project template. */
- String getDescription();
-
- /** Set description of project template. */
- void setDescription(String description);
-
- ProjectTemplateDescriptor withDescription(String description);
-
- /** Get project type of project template. */
- String getProjectType();
-
- /** Set project type of project template. */
- void setProjectType(String projectType);
-
- ProjectTemplateDescriptor withProjectType(String projectType);
-
- List getMixins();
-
- void setMixins(List mixins);
-
- ProjectTemplateDescriptor withMixins(List mixins);
-
- Map> getAttributes();
-
- void setAttributes(Map> attributes);
-
- ProjectTemplateDescriptor withAttributes(Map> attributes);
-
- List getModules();
-
- void setModules(List modules);
-
- ProjectTemplateDescriptor withModules(List modules);
-
- List getProblems();
-
- /** @see #getProblems */
- void setProblems(List problems);
-
- ProjectTemplateDescriptor withProblems(List problems);
-
- SourceStorageDto getSource();
-
- void setSource(SourceStorageDto sources);
-
- ProjectTemplateDescriptor withSource(SourceStorageDto sources);
-
- List getLinks();
-
- void setLinks(List links);
-
- ProjectTemplateDescriptor withLinks(List links);
-
- /** Get display name of project template. */
- String getDisplayName();
-
- /** Set display name of project template. */
- void setDisplayName(String displayName);
-
- ProjectTemplateDescriptor withDisplayName(String displayName);
-
- /** Get category of project template. */
- String getCategory();
-
- /** Set category of project template. */
- void setCategory(String category);
-
- ProjectTemplateDescriptor withCategory(String category);
-
- List getCommands();
-
- void setCommands(List commands);
-
- ProjectTemplateDescriptor withCommands(List commands);
-
- List getTags();
-
- void setTags(List tags);
-
- ProjectTemplateDescriptor withTags(List tags);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java
deleted file mode 100644
index 569511b54e..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.api.core.model.project.type.ProjectType;
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-
-/**
- * @author gazarenkov
- */
-@DTO
-public interface ProjectTypeDto extends ProjectType {
-
- /** Get unique ID of type of project. */
- @Override
- String getId();
-
- ProjectTypeDto withId(String id);
-
- /** Get display name of type of project. */
- @Override
- String getDisplayName();
-
- ProjectTypeDto withDisplayName(String name);
-
- @Override
- List getAttributes();
-
- ProjectTypeDto withAttributes(List attributeDescriptors);
-
-
- @Override
- List getParents();
-
- ProjectTypeDto withParents(List parents);
-
- @Override
- boolean isPrimaryable();
-
- ProjectTypeDto withPrimaryable(boolean primaryable);
-
-
- @Override
- boolean isMixable();
-
- ProjectTypeDto withMixable(boolean mixable);
-
- @Override
- boolean isPersisted();
-
- ProjectTypeDto withPersisted(boolean persisted);
-
- /**
- * @return all the ancestors of this project type
- */
- List getAncestors();
-
- ProjectTypeDto withAncestors(List ancestors);
-
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java
deleted file mode 100644
index 9e3e92d202..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.api.core.factory.FactoryParameter;
-import org.eclipse.che.dto.shared.DTO;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.util.List;
-import java.util.Map;
-
-import static org.eclipse.che.api.core.factory.FactoryParameter.Obligation.OPTIONAL;
-
-/**
- * Data transfer object (DTO) for update project.
- *
- * @author andrew00x
- */
-@DTO
-@ApiModel(description = "Update project")
-public interface ProjectUpdate {
- /** Get unique ID of type of project. */
- @ApiModelProperty(value = "Unique ID of project's type", required = true)
- @FactoryParameter(obligation = OPTIONAL)
- String getType();
-
- /** Set unique ID of type of project. */
- void setType(String type);
-
- ProjectUpdate withType(String type);
-
- //
-
- /** Get optional description of project. */
- @ApiModelProperty(value = "Optional description for new project")
- @FactoryParameter(obligation = OPTIONAL)
- String getDescription();
-
- /** Set optional description of project. */
- void setDescription(String description);
-
- ProjectUpdate withDescription(String description);
-
- //
-
- @ApiModelProperty(value = "Attributes for project")
- @FactoryParameter(obligation = OPTIONAL)
- /** Get attributes of project. */
- Map> getAttributes();
-
- /** Set attributes of project. */
- void setAttributes(Map> attributes);
-
- ProjectUpdate withAttributes(Map> attributes);
-
- //
-
- @ApiModelProperty(value = "Visibility for project", allowableValues = "public,private")
- @FactoryParameter(obligation = OPTIONAL)
- /** Gets project visibility, e.g. private or public. */
- String getVisibility();
-
- /** Sets project visibility, e.g. private or public. */
- void setVisibility(String visibility);
-
- ProjectUpdate withVisibility(String visibility);
-
-
- /** Gets project mixin types */
- @ApiModelProperty("Mixing types")
- List getMixins();
-
- /** Sets permissions of current user on this project. */
- void setMixins(List mixins);
-
- ProjectUpdate withMixins(List mixins);
-
-
- String getRecipe();
-
- void setRecipe(String recipe);
-
- ProjectUpdate withRecipe(String recipe);
-
- String getContentRoot();
-
- void setContentRoot(String contentRoot);
-
- ProjectUpdate withContentRoot(String contentRoot);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java
deleted file mode 100644
index d2054f131d..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * @author andrew00x
- */
-@DTO
-public interface SourceEstimation {
-
-
- /** Gets unique id of type of project. */
- @ApiModelProperty(value = "type ID", position = 1)
- String getType();
-
- SourceEstimation withType(String type);
-
-
- /** Gets attributes of this project. */
- @ApiModelProperty(value = "Project attributes", position = 2)
- Map> getAttributes();
-
-
- SourceEstimation withAttributes(Map> attributes);
-
- @ApiModelProperty(value = "if matched", position = 3)
- boolean isMatched();
-
- SourceEstimation withMatched(boolean matched);
-
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java
deleted file mode 100644
index cd29bbd9ff..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-
-/**
- * @author andrew00x
- */
-@DTO
-public interface TreeElement {
- ItemReference getNode();
-
- void setNode(ItemReference node);
-
- TreeElement withNode(ItemReference node);
-
- List getChildren();
-
- void setChildren(List children);
-
- TreeElement withChildren(List children);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java
deleted file mode 100644
index e193ab7d44..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto;
-
-import org.eclipse.che.api.core.model.project.type.Value;
-import org.eclipse.che.dto.shared.DTO;
-
-import java.util.List;
-
-/**
- * Data transfer object (DTO) for Value
- *
- * @author gazarenkov
- */
-@DTO
-public interface ValueDto extends Value {
-
- @Override
- String getString();
-
- @Override
- List getList();
-
- ValueDto withList(List list);
-}
diff --git a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java b/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java
deleted file mode 100644
index e746849887..0000000000
--- a/wsagent/che-core-api-project-share/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.shared.dto.event;
-
-import org.eclipse.che.api.core.notification.EventOrigin;
-import org.eclipse.che.api.vfs.impl.file.FileWatcherEventType;
-import org.eclipse.che.dto.shared.DTO;
-
-/**
- * @author gazarenkov
- */
-@EventOrigin("vfs")
-@DTO
-public interface VfsWatchEvent {
-
- String VFS_CHANNEL = "vfs";
-
- String getPath();
-
- VfsWatchEvent withPath(String path);
-
-
- FileWatcherEventType getType();
-
- VfsWatchEvent withType(FileWatcherEventType type);
-
-
- boolean isFile();
-
- VfsWatchEvent withFile(boolean isFile);
-
-}
diff --git a/wsagent/che-core-api-project-shared/pom.xml b/wsagent/che-core-api-project-shared/pom.xml
index 80eac073b6..b2f3613980 100644
--- a/wsagent/che-core-api-project-shared/pom.xml
+++ b/wsagent/che-core-api-project-shared/pom.xml
@@ -39,13 +39,6 @@
swagger-annotations
- javax.annotation
- javax.annotation-api
-
-
- javax.validation
- validation-api
-
org.eclipse.che.core
che-core-api-core
@@ -53,6 +46,10 @@
org.eclipse.che.core
che-core-api-dto
+
+ org.eclipse.che.core
+ che-core-api-machine-shared
+
org.eclipse.che.core
che-core-api-model
@@ -65,11 +62,6 @@
org.eclipse.che.core
che-core-commons-annotations
-
- org.eclipse.che.core
- che-core-commons-json
- test
-
@@ -98,8 +90,8 @@
- org.eclipse.che.core
- che-core-api-project
+ ${project.groupId}
+ ${project.artifactId}
${project.version}
diff --git a/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/Constants.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/Constants.java
index a215777fdb..b7ffbca227 100644
--- a/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/Constants.java
+++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/Constants.java
@@ -15,8 +15,23 @@ package org.eclipse.che.api.project.shared;
*/
public class Constants {
- public static final String BLANK_ID = "blank";
- public static final String VCS_PROVIDER_NAME = "vcs.provider.name";
+ public static final String BLANK_ID = "blank";
+ public static final String ZIP_IMPORTER_ID = "zip";
+ public static final String VCS_PROVIDER_NAME = "vcs.provider.name";
+ // rels for known project links
+ public static final String LINK_REL_GET_PROJECTS = "get projects";
+ public static final String LINK_REL_CREATE_PROJECT = "create project";
+ public static final String LINK_REL_UPDATE_PROJECT = "update project";
+ public static final String LINK_REL_EXPORT_ZIP = "zipball sources";
+ public static final String LINK_REL_CHILDREN = "children";
+ public static final String LINK_REL_TREE = "tree";
+ public static final String LINK_REL_DELETE = "delete";
+ public static final String LINK_REL_GET_CONTENT = "get content";
+ public static final String LINK_REL_UPDATE_CONTENT = "update content";
+
+ public static final String LINK_REL_PROJECT_TYPES = "project types";
+
+ public static final String CODENVY_DIR = ".codenvy";
private Constants() {
}
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherEventType.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/FileWatcherEventType.java
similarity index 91%
rename from wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherEventType.java
rename to wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/FileWatcherEventType.java
index 9b4204e869..f5c62416ab 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherEventType.java
+++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/FileWatcherEventType.java
@@ -8,7 +8,7 @@
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
-package org.eclipse.che.api.vfs.impl.file;
+package org.eclipse.che.api.project.shared.dto.event;
/**
* @author andrew00x
diff --git a/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java
index e746849887..0c6e01df77 100644
--- a/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java
+++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java
@@ -11,7 +11,6 @@
package org.eclipse.che.api.project.shared.dto.event;
import org.eclipse.che.api.core.notification.EventOrigin;
-import org.eclipse.che.api.vfs.impl.file.FileWatcherEventType;
import org.eclipse.che.dto.shared.DTO;
/**
diff --git a/wsagent/che-core-api-project/pom.xml b/wsagent/che-core-api-project/pom.xml
index 441a6fbcfe..064f97a75d 100644
--- a/wsagent/che-core-api-project/pom.xml
+++ b/wsagent/che-core-api-project/pom.xml
@@ -22,10 +22,6 @@
jar
Che Core :: API :: Project
-
- com.google.code.gson
- gson
-
com.google.guava
guava
@@ -96,11 +92,12 @@
org.eclipse.che.core
- che-core-api-machine-shared
+ che-core-api-model
org.eclipse.che.core
- che-core-api-model
+ che-core-api-project-shared
+ 4.3.0-RC1-SNAPSHOT
org.eclipse.che.core
@@ -214,79 +211,6 @@
-
- org.eclipse.che.core
- che-core-api-dto-maven-plugin
- ${project.version}
-
-
- process-sources
-
- generate
-
-
-
-
-
- org.eclipse.che.core
- che-core-api-project
- ${project.version}
-
-
-
-
- org.eclipse.che.api.project.shared.dto
-
- ${dto-generator-out-directory}
- org.eclipse.che.api.project.server.dto.DtoServerImpls
- server
-
-
-
- maven-compiler-plugin
-
-
- pre-compile
- generate-sources
-
- compile
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
-
-
- add-resource
- process-sources
-
- add-resource
-
-
-
-
- ${dto-generator-out-directory}/META-INF
- META-INF
-
-
-
-
-
- add-source
- process-sources
-
- add-source
-
-
-
- ${dto-generator-out-directory}
-
-
-
-
-
org.apache.maven.plugins
maven-surefire-plugin
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/Constants.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/Constants.java
deleted file mode 100644
index 86a467e3c8..0000000000
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/Constants.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012-2016 Codenvy, S.A.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Codenvy, S.A. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.che.api.project.server;
-
-/** @author andrew00x */
-public class Constants {
- // rels for known project links
- public static final String LINK_REL_GET_PROJECTS = "get projects";
- public static final String LINK_REL_CREATE_PROJECT = "create project";
- public static final String LINK_REL_UPDATE_PROJECT = "update project";
- public static final String LINK_REL_EXPORT_ZIP = "zipball sources";
- public static final String LINK_REL_CHILDREN = "children";
- public static final String LINK_REL_TREE = "tree";
- //public static final String LINK_REL_MODULES = "modules";
- public static final String LINK_REL_DELETE = "delete";
- public static final String LINK_REL_GET_CONTENT = "get content";
- public static final String LINK_REL_UPDATE_CONTENT = "update content";
-
- public static final String LINK_REL_PROJECT_TYPES = "project types";
-
- public static final String CODENVY_DIR = ".codenvy";
-
- private Constants() {
- }
-}
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectManager.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectManager.java
index 6b98a53316..4f5204be81 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectManager.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectManager.java
@@ -34,6 +34,7 @@ import org.eclipse.che.api.project.server.type.ProjectTypeDef;
import org.eclipse.che.api.project.server.type.ProjectTypeRegistry;
import org.eclipse.che.api.project.server.type.ProjectTypeResolution;
import org.eclipse.che.api.project.server.type.ValueStorageException;
+import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType;
import org.eclipse.che.api.project.shared.dto.event.VfsWatchEvent;
import org.eclipse.che.api.vfs.Path;
import org.eclipse.che.api.vfs.VirtualFile;
@@ -41,7 +42,6 @@ import org.eclipse.che.api.vfs.VirtualFileFilter;
import org.eclipse.che.api.vfs.VirtualFileSystem;
import org.eclipse.che.api.vfs.VirtualFileSystemProvider;
import org.eclipse.che.api.vfs.impl.file.FileTreeWatcher;
-import org.eclipse.che.api.vfs.impl.file.FileWatcherEventType;
import org.eclipse.che.api.vfs.impl.file.FileWatcherNotificationHandler;
import org.eclipse.che.api.vfs.impl.file.FileWatcherNotificationListener;
import org.eclipse.che.api.vfs.search.Searcher;
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectService.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectService.java
index f209e348ab..9114545d94 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectService.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectService.java
@@ -84,13 +84,15 @@ import static javax.ws.rs.HttpMethod.GET;
import static javax.ws.rs.HttpMethod.PUT;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import static org.eclipse.che.api.core.util.LinksHelper.createLink;
-import static org.eclipse.che.api.project.server.Constants.LINK_REL_CHILDREN;
-import static org.eclipse.che.api.project.server.Constants.LINK_REL_DELETE;
-import static org.eclipse.che.api.project.server.Constants.LINK_REL_GET_CONTENT;
-import static org.eclipse.che.api.project.server.Constants.LINK_REL_TREE;
-import static org.eclipse.che.api.project.server.Constants.LINK_REL_UPDATE_CONTENT;
-import static org.eclipse.che.api.project.server.Constants.LINK_REL_UPDATE_PROJECT;
import static org.eclipse.che.api.project.server.DtoConverter.asDto;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_CHILDREN;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_CREATE_PROJECT;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_DELETE;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_GET_CONTENT;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_GET_PROJECTS;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_TREE;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_UPDATE_CONTENT;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_UPDATE_PROJECT;
import static org.eclipse.che.dto.server.DtoFactory.newDto;
/**
@@ -125,7 +127,7 @@ public class ProjectService extends Service {
responseContainer = "List")
@ApiResponses({@ApiResponse(code = 200, message = "OK"),
@ApiResponse(code = 500, message = "Server error")})
- @GenerateLink(rel = Constants.LINK_REL_GET_PROJECTS)
+ @GenerateLink(rel = LINK_REL_GET_PROJECTS)
public List getProjects(@ApiParam("ID of workspace to get projects")
@PathParam("ws-id") String workspace) throws IOException,
ServerException,
@@ -165,7 +167,7 @@ public class ProjectService extends Service {
@ApiResponse(code = 403, message = "Operation is forbidden"),
@ApiResponse(code = 409, message = "Project with specified name already exist in workspace"),
@ApiResponse(code = 500, message = "Server error")})
- @GenerateLink(rel = Constants.LINK_REL_CREATE_PROJECT)
+ @GenerateLink(rel = LINK_REL_CREATE_PROJECT)
/**
* NOTE: parentPath is added to make a module
*/
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectTypeService.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectTypeService.java
index 1b1ceb64ad..f27b6df581 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectTypeService.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectTypeService.java
@@ -20,6 +20,8 @@ import org.eclipse.che.api.core.NotFoundException;
import org.eclipse.che.api.core.rest.Service;
import org.eclipse.che.api.core.rest.annotations.GenerateLink;
import org.eclipse.che.api.project.server.type.ProjectTypeRegistry;
+import org.eclipse.che.api.project.shared.*;
+import org.eclipse.che.api.project.shared.Constants;
import org.eclipse.che.api.project.shared.dto.ProjectTypeDto;
import javax.inject.Inject;
@@ -32,6 +34,7 @@ import java.util.List;
import java.util.stream.Collectors;
import static org.eclipse.che.api.project.server.DtoConverter.asDto;
+import static org.eclipse.che.api.project.shared.Constants.LINK_REL_PROJECT_TYPES;
/**
* ProjectTypeService
@@ -55,7 +58,7 @@ public class ProjectTypeService extends Service {
@GET
@Produces(MediaType.APPLICATION_JSON)
- @GenerateLink(rel = Constants.LINK_REL_PROJECT_TYPES)
+ @GenerateLink(rel = LINK_REL_PROJECT_TYPES)
@ApiOperation(value = "Get project types",
responseContainer = "List",
response = ProjectTypeDto.class)
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ZipProjectImporter.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ZipProjectImporter.java
index d52eaeada8..341681c5df 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ZipProjectImporter.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ZipProjectImporter.java
@@ -23,16 +23,17 @@ import java.io.InputStream;
import java.net.URL;
import java.util.Map;
+import static org.eclipse.che.api.project.shared.Constants.ZIP_IMPORTER_ID;
+
/**
* @author Vitaly Parfonov
*/
@Singleton
public class ZipProjectImporter implements ProjectImporter {
- public static final String ID = "zip";
@Override
public String getId() {
- return ID;
+ return ZIP_IMPORTER_ID;
}
@Override
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandler.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandler.java
index 4dab5219b4..6e3f82a5aa 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandler.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandler.java
@@ -11,6 +11,7 @@
package org.eclipse.che.api.vfs.impl.file;
import org.eclipse.che.api.core.ServerException;
+import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType;
import org.eclipse.che.api.vfs.Path;
import org.eclipse.che.api.vfs.VirtualFile;
import org.eclipse.che.api.vfs.VirtualFileSystemProvider;
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcher.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcher.java
index 0463a98dda..761e95fd89 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcher.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcher.java
@@ -12,6 +12,7 @@ package org.eclipse.che.api.vfs.impl.file;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -54,9 +55,9 @@ import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
import static java.nio.file.StandardWatchEventKinds.OVERFLOW;
import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.CREATED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.DELETED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.MODIFIED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.CREATED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.DELETED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.MODIFIED;
@Singleton
public class FileTreeWatcher {
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationHandler.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationHandler.java
index ba5897acea..552ca1929e 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationHandler.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationHandler.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.che.api.vfs.impl.file;
+import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType;
+
import java.io.File;
public interface FileWatcherNotificationHandler {
diff --git a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationListener.java b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationListener.java
index 79c0ee6208..02d2d9591f 100644
--- a/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationListener.java
+++ b/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/vfs/impl/file/FileWatcherNotificationListener.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.che.api.vfs.impl.file;
+import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType;
import org.eclipse.che.api.vfs.VirtualFile;
import org.eclipse.che.api.vfs.VirtualFileFilter;
diff --git a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/VfsWatcherTest.java b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/VfsWatcherTest.java
index f7da184394..2823bce841 100644
--- a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/VfsWatcherTest.java
+++ b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/project/server/VfsWatcherTest.java
@@ -13,7 +13,7 @@ package org.eclipse.che.api.project.server;
import org.eclipse.che.api.core.notification.EventSubscriber;
import org.eclipse.che.api.project.shared.dto.event.VfsWatchEvent;
import org.eclipse.che.api.vfs.VirtualFile;
-import org.eclipse.che.api.vfs.impl.file.FileWatcherEventType;
+import org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType;
import org.eclipse.che.api.vfs.impl.file.FileWatcherNotificationListener;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
diff --git a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandlerTest.java b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandlerTest.java
index c738129e76..745919ad39 100644
--- a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandlerTest.java
+++ b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/DefaultFileWatcherNotificationHandlerTest.java
@@ -19,9 +19,9 @@ import org.junit.Test;
import java.io.File;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.CREATED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.DELETED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.MODIFIED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.CREATED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.DELETED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.MODIFIED;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
import static org.mockito.Mockito.mock;
@@ -91,4 +91,4 @@ public class DefaultFileWatcherNotificationHandlerTest {
verify(notificationListener).shouldBeNotifiedFor(virtualFile);
verify(notificationListener).onFileWatcherEvent(virtualFile, MODIFIED);
}
-}
\ No newline at end of file
+}
diff --git a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherMassiveIoOperationTest.java b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherMassiveIoOperationTest.java
index 845da8d128..e661ca6006 100644
--- a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherMassiveIoOperationTest.java
+++ b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherMassiveIoOperationTest.java
@@ -24,9 +24,9 @@ import java.util.stream.Collectors;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newHashSet;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.CREATED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.DELETED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.MODIFIED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.CREATED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.DELETED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.MODIFIED;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
@@ -229,4 +229,4 @@ public class FileTreeWatcherMassiveIoOperationTest {
}
fail(message.toString());
}
-}
\ No newline at end of file
+}
diff --git a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherTest.java b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherTest.java
index 4dabcd672c..b2dad644f9 100644
--- a/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherTest.java
+++ b/wsagent/che-core-api-project/src/test/java/org/eclipse/che/api/vfs/impl/file/FileTreeWatcherTest.java
@@ -24,9 +24,9 @@ import java.util.List;
import java.util.Set;
import static com.google.common.collect.Sets.newHashSet;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.CREATED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.DELETED;
-import static org.eclipse.che.api.vfs.impl.file.FileWatcherEventType.MODIFIED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.CREATED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.DELETED;
+import static org.eclipse.che.api.project.shared.dto.event.FileWatcherEventType.MODIFIED;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
diff --git a/wsagent/pom.xml b/wsagent/pom.xml
index 66f202dc35..5459d57f84 100644
--- a/wsagent/pom.xml
+++ b/wsagent/pom.xml
@@ -25,6 +25,7 @@
pom
Che Agent Parent
+ che-core-api-project-shared
che-core-api-project
che-core-api-git
che-core-api-git-shared