use of org.wso2.ei.dashboard.core.rest.delegates.UpdateArtifactObject in project product-mi-tooling by wso2.
the class MiArtifactsManager method updateArtifactDetails.
public boolean updateArtifactDetails() throws ManagementApiException {
if (updateArtifactObject != null) {
String groupId = updateArtifactObject.getGroupId();
String nodeId = updateArtifactObject.getNodeId();
String mgtApiUrl = updateArtifactObject.getMgtApiUrl();
String accessToken = databaseManager.getAccessToken(groupId, nodeId);
String artifactType = updateArtifactObject.getType();
String artifactName = updateArtifactObject.getName();
JsonObject details = getArtifactDetails(groupId, nodeId, mgtApiUrl, artifactType, artifactName, accessToken);
return databaseManager.updateDetails(artifactType, artifactName, groupId, nodeId, details.toString());
} else {
throw new DashboardServerException("Artifact details are invalid");
}
}
use of org.wso2.ei.dashboard.core.rest.delegates.UpdateArtifactObject in project product-mi-tooling by wso2.
the class DelegatesUtil method updateDatabase.
private static boolean updateDatabase(String artifactType, String mgtApiUrl, String groupId, ArtifactUpdateRequest request) throws ManagementApiException {
UpdateArtifactObject updateArtifactObject = new UpdateArtifactObject(mgtApiUrl, artifactType, request.getArtifactName(), groupId, request.getNodeId());
MiArtifactsManager miArtifactsManager = new MiArtifactsManager(updateArtifactObject);
return miArtifactsManager.updateArtifactDetails();
}
Aggregations