Class ProjectReference
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable,HasId,ModelEntityReference,ModelObjectReference,ReferenceWithUpdatable<UpdatableProject>,HasPortalLink,Serializable
- Since:
- 3.9.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProjectReference(String id, String requestedRevision, String actualRevision) -
Method Summary
Modifier and TypeMethodDescriptioncreateLink(SharedContext context) Creates portal link.booleanstatic ProjectReferenceThe path is trimmed before parsing, so it can contain spaces at the start or end.Deprecated.getFromRevision(ReadOnlyTransaction transaction, String requestedRevision) Returns the object from the specified revision.getWithRevision(String requestedRevision) Deprecated.inthashCode()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
getUpdatableMethods 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
Deprecated.Description copied from interface:ModelObjectReferenceReturns the reference to current revision of the object, in other words reference without requested revision and actual revision. It is a shortcut for callingModelObjectReference.getWithRevision(String)with null.Note: The returned reference retains the current path (space and name) of the object. It does not correctly support objects (e.g. Documents) that were renamed or moved, because the path in the reference reflects the object's current location, not its location at any given revision. As a result, using this reference may fail to resolve the object if it has been renamed or moved.
- Specified by:
getCurrentin interfaceModelObjectReference- Overrides:
getCurrentin classModelObjectReferenceBase<Project,ProjectReference>
-
getWithRevision
Deprecated.Description copied from interface:ModelObjectReferenceReturns the reference to the same object, but with differentModelObjectReference.requestedRevision(), theModelObjectReference.actualRevision()of the returned reference is null.Note: The returned reference retains the current path (space and name) of the object. It does not correctly support objects (e.g. Documents) that were renamed or moved, because the path in the reference reflects the object's current location, not its location at the specified revision. As a result, using this reference may fail to resolve the object if it has been renamed or moved.
- Specified by:
getWithRevisionin interfaceModelObjectReference- Specified by:
getWithRevisionin classModelObjectReferenceBase<Project,ProjectReference> - Parameters:
requestedRevision- the revision to be set in the returned reference, or null for the current revision.- See Also:
-
scope
- Specified by:
scopein interfaceModelObjectReference
-
id
-
toPath
Description copied from interface:ModelObjectReferenceReturns 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:
toPathin interfaceModelEntityReference- Specified by:
toPathin interfaceModelObjectReference- See Also:
-
hashCode
public int hashCode()- Overrides:
hashCodein classModelObjectReferenceBase<Project,ProjectReference>
-
equals
- Overrides:
equalsin classModelObjectReferenceBase<Project,ProjectReference>
-
prototype
- Specified by:
prototypein interfaceModelObjectReference
-
ModelObjectReference.getCurrent()