From caeb5f38f82040a0e885dc86dc75260c93fcec55 Mon Sep 17 00:00:00 2001 From: Vitaly Parfonov Date: Wed, 4 May 2016 15:24:21 +0300 Subject: [PATCH] Rename share to shared Signed-off-by: Vitaly Parfonov --- wsagent/che-core-api-project-shared/pom.xml | 162 ++++++++++++++++++ .../che/api/project/shared/Constants.java | 23 +++ .../shared/dto/AttributeDescriptor.java | 54 ++++++ .../api/project/shared/dto/AttributeDto.java | 49 ++++++ .../api/project/shared/dto/CopyOptions.java | 47 +++++ .../shared/dto/GeneratorDescription.java | 36 ++++ .../api/project/shared/dto/ItemReference.java | 88 ++++++++++ .../api/project/shared/dto/MoveOptions.java | 48 ++++++ .../shared/dto/ProjectImporterData.java | 37 ++++ .../shared/dto/ProjectImporterDescriptor.java | 71 ++++++++ .../shared/dto/ProjectTemplateDescriptor.java | 119 +++++++++++++ .../project/shared/dto/ProjectTypeDto.java | 70 ++++++++ .../api/project/shared/dto/ProjectUpdate.java | 99 +++++++++++ .../project/shared/dto/SourceEstimation.java | 47 +++++ .../api/project/shared/dto/TreeElement.java | 33 ++++ .../che/api/project/shared/dto/ValueDto.java | 33 ++++ .../shared/dto/event/VfsWatchEvent.java | 40 +++++ 17 files changed, 1056 insertions(+) create mode 100644 wsagent/che-core-api-project-shared/pom.xml create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/Constants.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTemplateDescriptor.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java create mode 100644 wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java diff --git a/wsagent/che-core-api-project-shared/pom.xml b/wsagent/che-core-api-project-shared/pom.xml new file mode 100644 index 0000000000..80eac073b6 --- /dev/null +++ b/wsagent/che-core-api-project-shared/pom.xml @@ -0,0 +1,162 @@ + + + + 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} + + + + + + + + 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 new file mode 100644 index 0000000000..a215777fdb --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/Constants.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java new file mode 100644 index 0000000000..ee8b5efe56 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDescriptor.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java new file mode 100644 index 0000000000..f850b31ea8 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/AttributeDto.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java new file mode 100644 index 0000000000..f46f7e2519 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/CopyOptions.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java new file mode 100644 index 0000000000..ced7d7a475 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/GeneratorDescription.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java new file mode 100644 index 0000000000..4ff7b652a9 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ItemReference.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java new file mode 100644 index 0000000000..ea648d007b --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/MoveOptions.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java new file mode 100644 index 0000000000..9f3c855c4b --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterData.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java new file mode 100644 index 0000000000..e403b1addb --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectImporterDescriptor.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTemplateDescriptor.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTemplateDescriptor.java new file mode 100644 index 0000000000..2023a5b312 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTemplateDescriptor.java @@ -0,0 +1,119 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java new file mode 100644 index 0000000000..569511b54e --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectTypeDto.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java new file mode 100644 index 0000000000..9e3e92d202 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ProjectUpdate.java @@ -0,0 +1,99 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java new file mode 100644 index 0000000000..d2054f131d --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/SourceEstimation.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java new file mode 100644 index 0000000000..cd29bbd9ff --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/TreeElement.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * 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-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java new file mode 100644 index 0000000000..e193ab7d44 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/ValueDto.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * 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-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 new file mode 100644 index 0000000000..e746849887 --- /dev/null +++ b/wsagent/che-core-api-project-shared/src/main/java/org/eclipse/che/api/project/shared/dto/event/VfsWatchEvent.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * 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); + +}