-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First draft of import framework (#958)
Signed-off-by: Erle Czar Mantos <[email protected]>
- Loading branch information
1 parent
37b0693
commit 6236635
Showing
23 changed files
with
728 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
repository-api/src/main/java/org/eclipse/vorto/repository/api/upload/StagingResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/** | ||
* Copyright (c) 2015-2016 Bosch Software Innovations GmbH and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Eclipse Distribution License v1.0 which accompany this distribution. | ||
* | ||
* The Eclipse Public License is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* The Eclipse Distribution License is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* Contributors: | ||
* Bosch Software Innovations GmbH - Please refer to git log | ||
*/ | ||
package org.eclipse.vorto.repository.api.upload; | ||
|
||
public class StagingResult { | ||
private String importer; | ||
private boolean valid; | ||
private String errorMessage; | ||
private String stagingId; | ||
private Object stagingDetails; | ||
|
||
public static StagingResult success(String importer, String stagingId, Object stagingDetails) { | ||
StagingResult result = new StagingResult(); | ||
|
||
result.setImporter(importer); | ||
result.setStagingId(stagingId); | ||
result.setValid(true); | ||
result.setStagingDetails(stagingDetails); | ||
|
||
return result; | ||
} | ||
|
||
public static StagingResult fail(String importer, String errorMessage, Object stagingDetails) { | ||
StagingResult result = new StagingResult(); | ||
|
||
result.setImporter(importer); | ||
result.setValid(false); | ||
result.setErrorMessage(errorMessage); | ||
result.setStagingDetails(stagingDetails); | ||
|
||
return result; | ||
} | ||
|
||
private StagingResult() { | ||
|
||
} | ||
|
||
public String getImporter() { | ||
return importer; | ||
} | ||
|
||
public void setImporter(String importer) { | ||
this.importer = importer; | ||
} | ||
|
||
public boolean isValid() { | ||
return valid; | ||
} | ||
|
||
public void setValid(boolean valid) { | ||
this.valid = valid; | ||
} | ||
|
||
public String getErrorMessage() { | ||
return errorMessage; | ||
} | ||
|
||
public void setErrorMessage(String errorMessage) { | ||
this.errorMessage = errorMessage; | ||
} | ||
|
||
public String getStagingId() { | ||
return stagingId; | ||
} | ||
|
||
public void setStagingId(String stagingId) { | ||
this.stagingId = stagingId; | ||
} | ||
|
||
public Object getStagingDetails() { | ||
return stagingDetails; | ||
} | ||
|
||
public void setStagingDetails(Object stagingDetails) { | ||
this.stagingDetails = stagingDetails; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.