From 3e85a0d3d4847198c06264329ff8535efdd21a1c Mon Sep 17 00:00:00 2001 From: jakubs <jakubs> Date: Wed, 7 Nov 2012 09:26:45 +0000 Subject: [PATCH] BIS-190 SP-295 add more constructors to metaproject identifier id SVN: 27530 --- .../metaproject/MetaprojectIdentifierId.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/metaproject/MetaprojectIdentifierId.java b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/metaproject/MetaprojectIdentifierId.java index 017db45c4d0..2c69ffc4b59 100644 --- a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/metaproject/MetaprojectIdentifierId.java +++ b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/metaproject/MetaprojectIdentifierId.java @@ -18,6 +18,7 @@ package ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.id.metaproject; import ch.systemsx.cisd.base.annotation.JsonObject; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.id.ObjectIdentifierId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MetaprojectIdentifier; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ServiceVersionHolder; /** @@ -39,6 +40,23 @@ public class MetaprojectIdentifierId extends ObjectIdentifierId implements IMeta super(identifier); } + /** + * @param identifier Metaproject identifier + */ + public MetaprojectIdentifierId(MetaprojectIdentifier identifier) + { + super(identifier.format()); + } + + /** + * @param ownerId Metaproject owner + * @param name Metaproject name + */ + public MetaprojectIdentifierId(String ownerId, String name) + { + this(new MetaprojectIdentifier(ownerId, name)); + } + // // JSON-RPC // -- GitLab