forked from eclipse/vorto
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added project resource namespace and name
Signed-off-by: shiv12095 <shiv12095@iiitd.ac.in>
- Loading branch information
Showing
7 changed files
with
50 additions
and
24 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
40 changes: 31 additions & 9 deletions
40
server/devtool/src/main/java/org/eclipse/vorto/server/devtool/models/ProjectResource.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 |
---|---|---|
@@ -1,33 +1,55 @@ | ||
package org.eclipse.vorto.server.devtool.models; | ||
|
||
public class ProjectResource { | ||
|
||
private String resourceId; | ||
private String name; | ||
private String version; | ||
private String namespace; | ||
|
||
public String getResourceId() { | ||
return resourceId; | ||
} | ||
|
||
public void setResourceId(String resourceId) { | ||
this.resourceId = resourceId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
public void setVersion(String version) { | ||
this.version = version; | ||
} | ||
|
||
public String getNamespace() { | ||
return namespace; | ||
} | ||
|
||
public void setNamespace(String namespace) { | ||
this.namespace = namespace; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if(obj.getClass().equals(this.getClass())){ | ||
ProjectResource projectResource = (ProjectResource)obj; | ||
if(projectResource.getResourceId().equals(this.resourceId)){ | ||
if (obj.getClass().equals(this.getClass())) { | ||
ProjectResource projectResource = (ProjectResource) obj; | ||
if (projectResource.getResourceId().equals(this.resourceId)) { | ||
// if (projectResource.getName().endsWith(this.name)) { | ||
// return true; | ||
// } | ||
return true; | ||
}else{ | ||
return false; | ||
} | ||
}else{ | ||
return false; | ||
} | ||
} | ||
return false; | ||
} | ||
} |
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