Class ProjectReference
java.lang.Object
com.polarion.alm.shared.api.model.ModelEntityReferenceBase<T,R>
com.polarion.alm.shared.api.model.ModelObjectReferenceBase<T,R>
com.polarion.alm.shared.api.model.ModelObjectReferenceWithUpdatable<Project,UpdatableProject,ProjectReference>
com.polarion.alm.shared.api.model.project.ProjectReference
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
,HasId
,ModelEntityReference
,ModelObjectReference
,ReferenceWithUpdatable<UpdatableProject>
,HasPortalLink
,Serializable
public final class ProjectReference
extends ModelObjectReferenceWithUpdatable<Project,UpdatableProject,ProjectReference>
implements HasPortalLink, HasId
- Since:
- 3.9.0
- See Also:
-
Constructor Summary
ConstructorDescriptionProjectReference
(String id, String requestedRevision, String actualRevision) -
Method Summary
Modifier and TypeMethodDescriptioncreateLink
(SharedContext context) Creates portal link.boolean
static ProjectReference
The path is trimmed before parsing, so it can contain spaces at the start or end.Returns the reference to current revision of the object, in other words reference without requested revision and actual revision.getFromRevision
(ReadOnlyTransaction transaction, String revision) getWithRevision
(String requestedRevision) Returns the reference to the same object, but with differentModelObjectReference.requestedRevision()
, theModelObjectReference.actualRevision()
of the returned reference is null.int
hashCode()
id()
scope()
toPath()
Returns type specific unique identification path of the object, for example for Work Items in project it is 'projectId/workItemId', theModelObjectReference.requestedRevision()
andModelObjectReference.actualRevision()
are ignored.Methods inherited from class com.polarion.alm.shared.api.model.ModelObjectReferenceWithUpdatable
getUpdatable
Methods inherited from class com.polarion.alm.shared.api.model.ModelObjectReferenceBase
actualRevision, get, getCurrent, getOriginal, projectId, requestedRevision, toString
-
Constructor Details
-
ProjectReference
public ProjectReference(@NotNull String id, @Nullable String requestedRevision, @Nullable String actualRevision) - Throws:
IllegalArgumentException
- when id is empty string
-
ProjectReference
- Throws:
IllegalArgumentException
- when id is empty string- Since:
- 3.9.1
-
-
Method Details
-
fromPath
The path is trimmed before parsing, so it can contain spaces at the start or end.- Throws:
IllegalArgumentException
- when path is empty string SeetoPath()
-
getCurrent
Description copied from interface:ModelObjectReference
Returns the reference to current revision of the object, in other words reference without requested revision and actual revision. It is shortcut for callingModelObjectReference.getWithRevision(String)
with null- Specified by:
getCurrent
in interfaceModelObjectReference
- Overrides:
getCurrent
in classModelObjectReferenceBase<Project,
ProjectReference>
-
getWithRevision
Description copied from interface:ModelObjectReference
Returns the reference to the same object, but with differentModelObjectReference.requestedRevision()
, theModelObjectReference.actualRevision()
of the returned reference is null.- Specified by:
getWithRevision
in interfaceModelObjectReference
- Specified by:
getWithRevision
in classModelObjectReferenceBase<Project,
ProjectReference> - See Also:
-
scope
- Specified by:
scope
in interfaceModelObjectReference
-
id
-
toPath
Description copied from interface:ModelObjectReference
Returns type specific unique identification path of the object, for example for Work Items in project it is 'projectId/workItemId', theModelObjectReference.requestedRevision()
andModelObjectReference.actualRevision()
are ignored.- Specified by:
toPath
in interfaceModelEntityReference
- Specified by:
toPath
in interfaceModelObjectReference
- See Also:
-
hashCode
public int hashCode()- Overrides:
hashCode
in classModelObjectReferenceBase<Project,
ProjectReference>
-
equals
- Overrides:
equals
in classModelObjectReferenceBase<Project,
ProjectReference>
-
prototype
- Specified by:
prototype
in interfaceModelObjectReference
-