com.hp.autonomy.hod.client.api.resource.ResourceUuid Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-hod-client Show documentation
Show all versions of java-hod-client Show documentation
Java Client for communicating with HP Haven OnDemand
package com.hp.autonomy.hod.client.api.resource;
import lombok.Data;
import java.io.Serializable;
import java.util.UUID;
@Data
public class ResourceUuid implements ResourceIdentifier {
private static final long serialVersionUID = -85589867313315229L;
private final UUID uuid;
public ResourceUuid(final UUID uuid) {
this.uuid = uuid;
}
public ResourceUuid(final String identifierString) {
if (!identifierString.startsWith(SEPARATOR)) {
throw new IllegalArgumentException("Invalid identifier string");
}
uuid = UUID.fromString(identifierString.substring(1));
}
@Override
public String toString() {
return SEPARATOR + uuid.toString();
}
}