parent
caeb5f38f8
commit
3bbdf852a5
|
|
@ -56,7 +56,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
|
|||
5
pom.xml
5
pom.xml
|
|
@ -145,6 +145,11 @@
|
|||
<artifactId>che-core-api-project</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-ssh</artifactId>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,172 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>che-agent-parent</artifactId>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<version>4.3.0-RC1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Che Core :: API :: Project Shared</name>
|
||||
<properties>
|
||||
<dto-generator-out-directory>${project.build.directory}/generated-sources/dto/</dto-generator-out-directory>
|
||||
<findbugs.failonerror>false</findbugs.failonerror>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-dto</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-model</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-workspace-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-commons-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-commons-json</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${generated.sources.directory}</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-dto-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<dtoPackages>
|
||||
<package>org.eclipse.che.api.project.shared.dto</package>
|
||||
</dtoPackages>
|
||||
<outputDirectory>${dto-generator-out-directory}</outputDirectory>
|
||||
<genClassName>org.eclipse.che.api.project.server.dto.DtoServerImpls</genClassName>
|
||||
<impl>server</impl>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>pre-compile</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-resource</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>add-resource</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${dto-generator-out-directory}/META-INF</directory>
|
||||
<targetPath>META-INF</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>${dto-generator-out-directory}</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/FileTreeWatcherMassiveIoOperationTest.java</exclude>
|
||||
<exclude>**/FileTreeWatcherTest.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -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() {
|
||||
}
|
||||
}
|
||||
|
|
@ -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<String> getValues();
|
||||
|
||||
void setValues(List<String> values);
|
||||
|
||||
AttributeDescriptor withValues(List<String> values);
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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<String, String> getOptions();
|
||||
|
||||
/** Set options needed for generator. */
|
||||
void setOptions(Map<String, String> options);
|
||||
|
||||
GeneratorDescription withOptions(Map<String, String> options);
|
||||
}
|
||||
|
|
@ -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<Link> links);
|
||||
|
||||
/**
|
||||
* Attributes
|
||||
*/
|
||||
Map<String, String> getAttributes();
|
||||
|
||||
void setAttributes(Map<String, String> attributes);
|
||||
|
||||
ItemReference withAttributes(Map<String, String> 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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
@ -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<ProjectImporterDescriptor> getImporters();
|
||||
|
||||
void setImporters(List<ProjectImporterDescriptor> importers);
|
||||
|
||||
ProjectImporterData withImporters(List<ProjectImporterDescriptor> importers);
|
||||
|
||||
Map<String, String> getConfiguration();
|
||||
|
||||
void setConfiguration(Map<String, String> configuration);
|
||||
|
||||
ProjectImporterData withConfiguration(Map<String, String> configuration);
|
||||
}
|
||||
|
|
@ -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<String, String> getAttributes();
|
||||
|
||||
/** Sets attributes for this project importer. */
|
||||
void setAttributes(Map<String, String> attributes);
|
||||
|
||||
ProjectImporterDescriptor withAttributes(Map<String, String> attributes);
|
||||
}
|
||||
|
|
@ -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<String> getMixins();
|
||||
|
||||
void setMixins(List<String> mixins);
|
||||
|
||||
ProjectTemplateDescriptor withMixins(List<String> mixins);
|
||||
|
||||
Map<String, List<String>> getAttributes();
|
||||
|
||||
void setAttributes(Map<String, List<String>> attributes);
|
||||
|
||||
ProjectTemplateDescriptor withAttributes(Map<String, List<String>> attributes);
|
||||
|
||||
List<ProjectConfigDto> getModules();
|
||||
|
||||
void setModules(List<ProjectConfigDto> modules);
|
||||
|
||||
ProjectTemplateDescriptor withModules(List<ProjectConfigDto> modules);
|
||||
|
||||
List<ProjectProblemDto> getProblems();
|
||||
|
||||
/** @see #getProblems */
|
||||
void setProblems(List<ProjectProblemDto> problems);
|
||||
|
||||
ProjectTemplateDescriptor withProblems(List<ProjectProblemDto> problems);
|
||||
|
||||
SourceStorageDto getSource();
|
||||
|
||||
void setSource(SourceStorageDto sources);
|
||||
|
||||
ProjectTemplateDescriptor withSource(SourceStorageDto sources);
|
||||
|
||||
List<Link> getLinks();
|
||||
|
||||
void setLinks(List<Link> links);
|
||||
|
||||
ProjectTemplateDescriptor withLinks(List<Link> 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<CommandDto> getCommands();
|
||||
|
||||
void setCommands(List<CommandDto> commands);
|
||||
|
||||
ProjectTemplateDescriptor withCommands(List<CommandDto> commands);
|
||||
|
||||
List<String> getTags();
|
||||
|
||||
void setTags(List<String> tags);
|
||||
|
||||
ProjectTemplateDescriptor withTags(List<String> tags);
|
||||
}
|
||||
|
|
@ -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<AttributeDto> getAttributes();
|
||||
|
||||
ProjectTypeDto withAttributes(List<AttributeDto> attributeDescriptors);
|
||||
|
||||
|
||||
@Override
|
||||
List<String> getParents();
|
||||
|
||||
ProjectTypeDto withParents(List<String> 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<String> getAncestors();
|
||||
|
||||
ProjectTypeDto withAncestors(List<String> ancestors);
|
||||
|
||||
}
|
||||
|
|
@ -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<String, List<String>> getAttributes();
|
||||
|
||||
/** Set attributes of project. */
|
||||
void setAttributes(Map<String, List<String>> attributes);
|
||||
|
||||
ProjectUpdate withAttributes(Map<String, List<String>> 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<String> getMixins();
|
||||
|
||||
/** Sets permissions of current user on this project. */
|
||||
void setMixins(List<String> mixins);
|
||||
|
||||
ProjectUpdate withMixins(List<String> mixins);
|
||||
|
||||
|
||||
String getRecipe();
|
||||
|
||||
void setRecipe(String recipe);
|
||||
|
||||
ProjectUpdate withRecipe(String recipe);
|
||||
|
||||
String getContentRoot();
|
||||
|
||||
void setContentRoot(String contentRoot);
|
||||
|
||||
ProjectUpdate withContentRoot(String contentRoot);
|
||||
}
|
||||
|
|
@ -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<String, List<String>> getAttributes();
|
||||
|
||||
|
||||
SourceEstimation withAttributes(Map<String, List<String>> attributes);
|
||||
|
||||
@ApiModelProperty(value = "if matched", position = 3)
|
||||
boolean isMatched();
|
||||
|
||||
SourceEstimation withMatched(boolean matched);
|
||||
|
||||
}
|
||||
|
|
@ -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<TreeElement> getChildren();
|
||||
|
||||
void setChildren(List<TreeElement> children);
|
||||
|
||||
TreeElement withChildren(List<TreeElement> children);
|
||||
}
|
||||
|
|
@ -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<String> getList();
|
||||
|
||||
ValueDto withList(List<String> list);
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
@ -39,13 +39,6 @@
|
|||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-core</artifactId>
|
||||
</dependency>
|
||||
|
|
@ -53,6 +46,10 @@
|
|||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-dto</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-machine-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-model</artifactId>
|
||||
|
|
@ -65,11 +62,6 @@
|
|||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-commons-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-commons-json</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
|
|
@ -98,8 +90,8 @@
|
|||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,10 +22,6 @@
|
|||
<packaging>jar</packaging>
|
||||
<name>Che Core :: API :: Project</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
|
|
@ -96,11 +92,12 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-machine-shared</artifactId>
|
||||
<artifactId>che-core-api-model</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-model</artifactId>
|
||||
<artifactId>che-core-api-project-shared</artifactId>
|
||||
<version>4.3.0-RC1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
|
|
@ -214,79 +211,6 @@
|
|||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-dto-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-api-project</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<dtoPackages>
|
||||
<package>org.eclipse.che.api.project.shared.dto</package>
|
||||
</dtoPackages>
|
||||
<outputDirectory>${dto-generator-out-directory}</outputDirectory>
|
||||
<genClassName>org.eclipse.che.api.project.server.dto.DtoServerImpls</genClassName>
|
||||
<impl>server</impl>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>pre-compile</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-resource</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>add-resource</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${dto-generator-out-directory}/META-INF</directory>
|
||||
<targetPath>META-INF</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>${dto-generator-out-directory}</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<ProjectConfigDto> 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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
<packaging>pom</packaging>
|
||||
<name>Che Agent Parent</name>
|
||||
<modules>
|
||||
<module>che-core-api-project-shared</module>
|
||||
<module>che-core-api-project</module>
|
||||
<module>che-core-api-git</module>
|
||||
<module>che-core-api-git-shared</module>
|
||||
|
|
|
|||
Loading…
Reference in New Issue