package com.perforce.spark.repository; import spark.Request; import com.perforce.p4java.impl.generic.core.Depot; import com.perforce.spark.AssetType; public class PerforceRepo implements RepoInterface { private final String name; private final AssetType type; private final String description; public PerforceRepo(Depot depot) { this.name = depot.getName(); this.type = AssetType.parse(depot.getDepotType()); this.description = depot.getDescription(); } public PerforceRepo(Request request) { String DEPOT = "depotID"; String TYPE = "type"; String DESC = "description"; this.name = request.queryParams(DEPOT); String typeStr = request.queryParams(TYPE); this.type = AssetType.parse(typeStr); this.description = request.queryParams(DESC); } @Override public String getName() { return name; } @Override public AssetType getAssetType() { return type; } @Override public String getTitle() { switch (getAssetType()) { case LOCAL: return "Classic Perforce Repo"; case STREAM: return "Stream Perforce Repo"; default: return "Unsupported Depot Type"; } } @Override public String getDescription() { return description; } public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Name: " + getName() + "\n"); sb.append("AssetType: " + getAssetType() + "\n"); sb.append("Title: " + getTitle() + "\n"); sb.append("Description: " + getDescription() + "\n"); return sb.toString(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 15012 | Paul Allen | Proxy configuration. | ||
#6 | 14886 | Paul Allen | Asset --> Artifact refactor | ||
#5 | 14866 | Paul Allen |
Create different Depot types. - Display site types |
||
#4 | 14864 | Paul Allen | Depot Configuration and Site type | ||
#3 | 14723 | Paul Allen | Tidy up deploy/upload | ||
#2 | 14227 | Paul Allen | Moved over MAVEN Artifact summary. | ||
#1 | 14181 | Paul Allen | Lots of updates and refactoring. |