Ofcas.Lk.Api.Client - Version 3.0  3.0.0.106
Ofcas.Lk.Api.Client.Core.Phase Class Reference

Phase is the representation of a LogiKal phase. The children are of type Elevation. The children can be received from the InfoList (CoreObject<T>.Infos). More...

Inheritance diagram for Ofcas.Lk.Api.Client.Core.Phase:
Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< Project, PhaseInfo, Elevation, ElevationInfo > Ofcas.Lk.Api.Client.Core.Interfaces.ICoreObjectWithSynchronizations Ofcas.Lk.Api.Client.Core.Interfaces.ICoreObject Ofcas.Lk.Api.Client.Ui.PhaseUi

Public Member Functions

 Phase (IApiService apiService, Guid coreObjectId, Project parent, PhaseInfo coreInfo)
 Creates a new phase. More...
 
override OperationInfo CanEdit (string key, object value)
 Checks whether an phase can be edited or not. More...
 
override PhaseInfo Edit (string key, object value)
 Edits an phase based on a key and a value. More...
 
override OperationInfo CanCreateChild ()
 Checks whether an elevation can be created or not. More...
 
override ElevationInfo CreateChild ()
 Creates a new elevation with a default name. Call Elevation.Edit with WellKnownEditKeys.Elevation to change values. More...
 
override OperationInfo CanDeleteChild (ElevationInfo elevationInfo)
 Checks whether an elevation can be deleted or not. More...
 
override void DeleteChild (ElevationInfo elevationInfo)
 Deletes an elevation based on an info object. More...
 
Elevation GetElevation (ElevationInfo elevationInfo)
 Returns the corresponding elevation based on the given info object. More...
 
ElevationInfo CreateLkElevation (string elevationName, ElementType elementType, string shortDescription, double amount, bool isAlternative)
 Creates a new Elevation in this phase via user interface. More...
 
void DeleteLkElevation (ElevationInfo elevationInfo)
 Deletes the corresponding logikal elevation based on the given information data. More...
 
string GetNextPositionNumber ()
 Retrieves the next available position number of this phase. More...
 
PhaseInfo SetParameter (string key, object value)
 Takes the parameter to update the phase. More...
 
override ElevationInfo RefreshChild (ElevationInfo childInfo)
 
override Elevation GetChild (ElevationInfo elevationInfo)
 
- Public Member Functions inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< Project, PhaseInfo, Elevation, ElevationInfo >
TOwnInfo Refresh ()
 
- Public Member Functions inherited from Ofcas.Lk.Api.Client.Core.Interfaces.ICoreObject
bool CanDispose ()
 Checks whether the ICoreInfo can be disposed. More...
 

Protected Member Functions

override CoreInfoResponse GetInfoResponse ()
 
virtual Elevation CreateNewInstance (Guid responseNewCoreObjectId, ElevationInfo elevationInfo)
 
bool IsChild (ElevationInfo elevationInfo)
 Determines if the provided info is the info a child of this object. More...
 
- Protected Member Functions inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< Project, PhaseInfo, Elevation, ElevationInfo >
 CoreObjectFullyQualified (IApiService apiService, Guid coreObjectId, TParent parent, TOwnInfo ownInfo)
 Creates a new instance of CoreObjectFullyQualified<TParent,TOwnInfo,TChild,TChildInfo> with the given parameters. More...
 

Properties

ISynchronizationContainer SynchronizationContainer [get]
 
- Properties inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< Project, PhaseInfo, Elevation, ElevationInfo >
TParent Parent [get]
 
TOwnInfo CoreInfo [get, protected set]
 
TOwnInfo Info [get, protected set]
 
- Properties inherited from Ofcas.Lk.Api.Client.Core.Interfaces.ICoreObjectWithSynchronizations
ISynchronizationContainer SynchronizationContainer [get]
 The ISynchronizationContainer of this ICoreObject. More...
 
- Properties inherited from Ofcas.Lk.Api.Client.Core.Interfaces.ICoreObject
Guid CoreObjectId [get]
 The unique identifier of this core object. More...
 

Detailed Description

Phase is the representation of a LogiKal phase. The children are of type Elevation. The children can be received from the InfoList (CoreObject<T>.Infos).

Constructor & Destructor Documentation

◆ Phase()

Ofcas.Lk.Api.Client.Core.Phase.Phase ( IApiService  apiService,
Guid  coreObjectId,
Project  parent,
PhaseInfo  coreInfo 
)

Creates a new phase.

Parameters
apiServiceThe used IApiService.
coreObjectIdThe core object id for this object.
parentThe parent of this object.
coreInfoThe info used to create this object.

Member Function Documentation

◆ CanCreateChild()

override OperationInfo Ofcas.Lk.Api.Client.Core.Phase.CanCreateChild ( )

Checks whether an elevation can be created or not.

Returns

◆ CanDeleteChild()

override OperationInfo Ofcas.Lk.Api.Client.Core.Phase.CanDeleteChild ( ElevationInfo  elevationInfo)

Checks whether an elevation can be deleted or not.

Parameters
elevationInfoThe info of the elevation to be deleted.
Returns

◆ CanEdit()

override OperationInfo Ofcas.Lk.Api.Client.Core.Phase.CanEdit ( string  key,
object  value 
)
virtual

Checks whether an phase can be edited or not.

Parameters
keyThe key of the value to be edited. See WellKnownEditKeys.Elevation for possible edit keys.
valueThe value to be set.
Returns

Reimplemented from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< Project, PhaseInfo, Elevation, ElevationInfo >.

◆ CreateChild()

override ElevationInfo Ofcas.Lk.Api.Client.Core.Phase.CreateChild ( )

Creates a new elevation with a default name. Call Elevation.Edit with WellKnownEditKeys.Elevation to change values.

Returns
Returns an info object of the created elevation.

◆ CreateLkElevation()

ElevationInfo Ofcas.Lk.Api.Client.Core.Phase.CreateLkElevation ( string  elevationName,
ElementType  elementType,
string  shortDescription,
double  amount,
bool  isAlternative 
)

Creates a new Elevation in this phase via user interface.

Parameters
elevationNameThe name of the new elevation
elementTypeThe type of the new elevation (ElementType)
shortDescriptionThe short descripton of the new elevation.
amountThe amount for the new elevation.
isAlternative

TODO(nhu) isAlternative?

Returns
The ElevationInfo of the created elevation or NULL if the user rejected the dialog.
Exceptions
ApiExceptionThrown if creation of elevation failed.

◆ DeleteChild()

override void Ofcas.Lk.Api.Client.Core.Phase.DeleteChild ( ElevationInfo  elevationInfo)

Deletes an elevation based on an info object.

Parameters
elevationInfoThe info of the elevation to be deleted.

◆ DeleteLkElevation()

void Ofcas.Lk.Api.Client.Core.Phase.DeleteLkElevation ( ElevationInfo  elevationInfo)

Deletes the corresponding logikal elevation based on the given information data.

Parameters
elevationInfoThe elevation information

◆ Edit()

override PhaseInfo Ofcas.Lk.Api.Client.Core.Phase.Edit ( string  key,
object  value 
)
virtual

Edits an phase based on a key and a value.

Parameters
keyThe key of the value to be edited. See WellKnownEditKeys.Elevation for possible edit keys.
valueThe value to be set.
Returns
Returns an info object of the edited phase.

Reimplemented from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< Project, PhaseInfo, Elevation, ElevationInfo >.

◆ GetElevation()

Elevation Ofcas.Lk.Api.Client.Core.Phase.GetElevation ( ElevationInfo  elevationInfo)

Returns the corresponding elevation based on the given info object.

Parameters
elevationInfoThe elevation information obtained through the CoreObject<T>.Infos function.
Returns
Returns an Elevation created based on the given information.
Exceptions
ApiExceptionThrow if getting elevation failed.

◆ GetNextPositionNumber()

string Ofcas.Lk.Api.Client.Core.Phase.GetNextPositionNumber ( )

Retrieves the next available position number of this phase.

Returns
Returns the next available position number for this phase.

◆ IsChild()

bool Ofcas.Lk.Api.Client.Core.Phase.IsChild ( ElevationInfo  elevationInfo)
protected

Determines if the provided info is the info a child of this object.

Parameters
elevationInfo
Returns
Returns true if the info is the info a child of this obejct

◆ SetParameter()

PhaseInfo Ofcas.Lk.Api.Client.Core.Phase.SetParameter ( string  key,
object  value 
)

Takes the parameter to update the phase.

Parameters
keyThe parameter key. Available keys are:

PHASE_NAME: string. Changes the phase's name.

PHASE_DESCRIPTION: string. Changes the phase's description.

Parameters
valueThe value for the parameter.
Returns
Returns the updated PhaseInfo.
Exceptions
ApiExceptionOccurs if any exception occured.

The documentation for this class was generated from the following file: