Class BaselineReference
java.lang.Object
com.polarion.alm.shared.api.model.ModelEntityReferenceBase<Baseline,BaselineReference>
com.polarion.alm.shared.api.model.ModelObjectReferenceBase<Baseline,BaselineReference>
com.polarion.alm.shared.api.model.baseline.BaselineReference
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable,HasId,HasProjectId,HasRelativePath,ModelEntityReference,ModelObjectReference,HasPortalLink,Serializable
public final class BaselineReference
extends ModelObjectReferenceBase<Baseline,BaselineReference>
implements HasId, HasProjectId, HasRelativePath, HasPortalLink
- Since:
- 3.9.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBaselineReference(String projectId, String id) BaselineReference(String projectId, String id, String requestedRevision, String actualRevision) -
Method Summary
Modifier and TypeMethodDescriptioncreateLink(SharedContext context) Creates portal link.booleanstatic BaselineReferencestatic BaselineReferencefromRelativePath(String baseProjectId, String path) The path is trimmed before parsing, so it can contain spaces at the start or end.
The path can be obtained usingtoRelativePath(String).get(ReadOnlyTransaction transaction) Returns the entity referenced by this reference.getFromRevision(ReadOnlyTransaction transaction, String requestedRevision) getWithRevision(String requestedRevision) Returns the reference to the same object, but with differentModelObjectReference.requestedRevision(), theModelObjectReference.actualRevision()of the returned reference is null.inthashCode()id()It is shortcut forModelObjectReference.scope().Scope.projectId()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.toRelativePath(String baseProjectId) Returns theid()if the baseProjectId is same asprojectId()otherwise returns the same value astoPath().
ThefromRelativePath(String, String)can be used to get the reference from the returned path.Methods inherited from class com.polarion.alm.shared.api.model.ModelObjectReferenceBase
actualRevision, getCurrent, getCurrent, getOriginal, requestedRevision, toString
-
Constructor Details
-
BaselineReference
- Throws:
IllegalArgumentException- when projectId or id is empty string
-
BaselineReference
public BaselineReference(@NotNull String projectId, @NotNull String id, @Nullable String requestedRevision, @Nullable String actualRevision) - Throws:
IllegalArgumentException- when projectId or id is empty string- Since:
- 3.19.1
-
-
Method Details
-
fromPath
- Throws:
IllegalArgumentException- in same conditions asWorkItemReference.fromPath(String)- Since:
- 3.19.1
- See Also:
-
fromRelativePath
@NotNull public static BaselineReference fromRelativePath(@Nullable String baseProjectId, @NotNull String path) The path is trimmed before parsing, so it can contain spaces at the start or end.
The path can be obtained usingtoRelativePath(String). The baseProjectId used in both calls must be the same.- Throws:
IllegalArgumentException- in same conditions asWorkItemReference.fromRelativePath(String, String)- Since:
- 3.19.1
-
id
-
projectId
Description copied from interface:ModelObjectReferenceIt is shortcut forModelObjectReference.scope().Scope.projectId()- Specified by:
projectIdin interfaceHasProjectId- Specified by:
projectIdin interfaceModelObjectReference- Overrides:
projectIdin classModelObjectReferenceBase<Baseline,BaselineReference>
-
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:
-
toRelativePath
Returns theid()if the baseProjectId is same asprojectId()otherwise returns the same value astoPath().
ThefromRelativePath(String, String)can be used to get the reference from the returned path. The baseProjectId used in both calls must be the same.- Specified by:
toRelativePathin interfaceHasRelativePath- Parameters:
baseProjectId- - null means global scope- Since:
- 3.19.1
-
prototype
- Specified by:
prototypein interfaceModelObjectReference- Since:
- 3.19.1
-
scope
- Specified by:
scopein interfaceModelObjectReference- Since:
- 3.19.1
-
getWithRevision
Description copied from interface:ModelObjectReferenceReturns the reference to the same object, but with differentModelObjectReference.requestedRevision(), theModelObjectReference.actualRevision()of the returned reference is null.- Specified by:
getWithRevisionin interfaceModelObjectReference- Specified by:
getWithRevisionin classModelObjectReferenceBase<Baseline,BaselineReference> - Since:
- 3.19.1
- See Also:
-
hashCode
public int hashCode()- Overrides:
hashCodein classModelObjectReferenceBase<Baseline,BaselineReference> - Since:
- 3.19.1
-
equals
- Overrides:
equalsin classModelObjectReferenceBase<Baseline,BaselineReference> - Since:
- 3.19.1
-