Ofcas.Lk.Api.Client - Version 3.0  3.0.0.113
Ofcas.Lk.Api.Client.Core.ProjectCenter Class Reference

ProjectCenter is the representation of a LogiKal project-center. The children are of type Project. The children can be received from the InfoList (CoreObjectWithChildren<TChild,TChildInfo>.ChildrenInfos). Each ProjectCenter belongs to a fixed directory. To use another project directory, create a new project center using method GetProjectCenter. More...

Inheritance diagram for Ofcas.Lk.Api.Client.Core.ProjectCenter:
Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< LoginScope, ProjectCenterInfo, Project, ProjectInfo > Ofcas.Lk.Api.Client.Ui.ProjectCenterUi

Public Member Functions

override Project GetChild (ProjectInfo projectInfo)
 Gets a Project based on a ProjectInfo. More...
 
Project GetProject (ProjectInfo projectInfo)
 This method is deprecated. Please use GetChild(ProjectInfo) instead. More...
 
ProjectCenter GetProjectCenter (ProjectDirectoryInfo projectDirectoryInfo)
 Creates a new ProjectCenter for the given directory. Each ProjectCenter belongs to a fixed directory. More...
 
override OperationInfo CanCreateChild ()
 Checks whether a project can be created or not. More...
 
override ProjectInfo CreateChild ()
 Creates a new project with a default name. Call Project.Edit with WellKnownEditKeys.Project.Name to change the name after the creation. More...
 
override OperationInfo CanDeleteChild (ProjectInfo projectInfo)
 Checks whether a project can be deleted or not. More...
 
override void DeleteChild (ProjectInfo projectInfo, bool forceDelete=false)
 Deletes a project based on an info object. More...
 
override OperationInfo CanMoveFrom (ICoreInfo coreInfo, bool deepCheck=true)
 
override ProjectInfo MoveFrom (ICoreInfo coreInfo)
 Moves an object into this directory based on an info object. More...
 
override OperationInfo CanCopyFrom (ICoreInfo coreInfo, bool deepCheck=true)
 
override ProjectInfo CopyFrom (ICoreInfo coreInfo)
 Copies an object into this directory based on an info object. More...
 
ProjectInfo CreateLkProject (string projectName)
 Creates a new Project in the LogiKal project structure. The project will be created in the current active directory. More...
 
Elevation GetElevationFromLkId (Guid lkElevGuid)
 
Exceptions
NotSupportedException

 
ElevationInstance GetElevationInstanceFromLkId (Guid lkElevInstanceGuid)
 
Exceptions
NotSupportedException

 
ProjectDirectoryInfo CreateDirectory (string directoryName)
 Creates a new directory in the current project center. More...
 
OperationInfo CanDeleteDirectory (string directoryName)
 Checks whether a directory can be deleted or not. More...
 
void DeleteDirectory (string directoryName)
 Deletes the directory from the current project center. More...
 
OperationInfo CanRename (string directoryName)
 Checks if the name of this project directory can be changed to the stated name. Renaming the root directory or the recyclebin is not possible. More...
 
ProjectDirectoryInfo Rename (string directoryName)
 Changes the name of this project directory to the stated name. Renaming the root directory or the recyclebin is not possible. More...
 
Stream ExportChild (ProjectInfo projectInfo, IEnumerable< ElevationInfo > elevationInfos, Dictionary< string, object > parameters)
 Exports a Project based on its ProjectInfo, list of ElevationInfo and parameters. More...
 
override ProjectInfo RefreshChild (ProjectInfo childInfo)
 
- Public Member Functions inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< LoginScope, ProjectCenterInfo, Project, ProjectInfo >
TOwnInfo Refresh ()
 
virtual OperationInfo CanEdit (string key, object value)
 
virtual TOwnInfo Edit (string key, object value)
 

Public Attributes

ProjectDirectoryInfo OwnDirectoryInfo => _ownDirectoryInfo
 Returns the directory info for the project-center More...
 

Protected Member Functions

override IEnumerable< ProjectInfoGetChildrenInfos ()
 
Stream ExportChild (ProjectInfo projectInfo, IEnumerable< ElevationInfo > elevationInfos, Dictionary< string, object > parameters, bool verbose)
 
virtual Project CreateNewInstance (Guid coreObjectId, ProjectInfo childInfo)
 
- Protected Member Functions inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< LoginScope, ProjectCenterInfo, Project, ProjectInfo >
 CoreObjectFullyQualified (IServiceFactory< IApiService > serviceFactory, Guid coreObjectId, TParent parent, TOwnInfo ownInfo)
 Creates a new instance of CoreObjectFullyQualified<TParent,TOwnInfo,TChild,TChildInfo> with the given parameters. More...
 

Properties

IList< ProjectDirectoryInfoProjectDirectoryInfos [get]
 
- Properties inherited from Ofcas.Lk.Api.Client.Core.CoreObjectFullyQualified< LoginScope, ProjectCenterInfo, Project, ProjectInfo >
TParent Parent [get]
 
TOwnInfo Info [get]
 

Detailed Description

ProjectCenter is the representation of a LogiKal project-center. The children are of type Project. The children can be received from the InfoList (CoreObjectWithChildren<TChild,TChildInfo>.ChildrenInfos). Each ProjectCenter belongs to a fixed directory. To use another project directory, create a new project center using method GetProjectCenter.

Member Function Documentation

◆ CanCreateChild()

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

Checks whether a project can be created or not.

Returns

◆ CanDeleteChild()

override OperationInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CanDeleteChild ( ProjectInfo  projectInfo)

Checks whether a project can be deleted or not.

Parameters
projectInfoThe info of the project to be deleted.
Returns

◆ CanDeleteDirectory()

OperationInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CanDeleteDirectory ( string  directoryName)

Checks whether a directory can be deleted or not.

Parameters
directoryNameThe name of the directory to be deleted.
Returns

◆ CanRename()

OperationInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CanRename ( string  directoryName)

Checks if the name of this project directory can be changed to the stated name. Renaming the root directory or the recyclebin is not possible.

Parameters
directoryNameThe new name of this project directory. Cannot contain any invalid chars defined by Path.GetInvalidFileNameChars.
Returns
Returns an OperationStatus containing the information if this operation can be called.

◆ CopyFrom()

override ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CopyFrom ( ICoreInfo  coreInfo)

Copies an object into this directory based on an info object.

Parameters
coreInfoThe info of the object to be copied.
Returns
Returns an info object of the copied / created project.

◆ CreateChild()

override ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CreateChild ( )

Creates a new project with a default name. Call Project.Edit with WellKnownEditKeys.Project.Name to change the name after the creation.

Returns
Returns an info object of the created project.

◆ CreateDirectory()

ProjectDirectoryInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CreateDirectory ( string  directoryName)

Creates a new directory in the current project center.

Parameters
directoryNameThe name of the directory to be created.
Returns
Returns the ProjectDirectoryInfo for the directory.
Exceptions
ArgumentNullExceptionOccurs if the directory name is null or empty.
InvalidOperationExceptionOccurs if the directory could not be found after refresh.
NotSupportedExceptionOccurs if the directory could not be found after refresh.

◆ CreateLkProject()

ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.CreateLkProject ( string  projectName)

Creates a new Project in the LogiKal project structure. The project will be created in the current active directory.

Parameters
projectNameThe name of the new project
Returns
The ProjectInfo to the created project
Exceptions
Exceptioncontains api error message

◆ DeleteChild()

override void Ofcas.Lk.Api.Client.Core.ProjectCenter.DeleteChild ( ProjectInfo  projectInfo,
bool  forceDelete = false 
)

Deletes a project based on an info object.

Parameters
projectInfoReturns an info of the project to be deleted.
forceDeleteIndicates whether the child should be completely deleted.

◆ DeleteDirectory()

void Ofcas.Lk.Api.Client.Core.ProjectCenter.DeleteDirectory ( string  directoryName)

Deletes the directory from the current project center.

Parameters
directoryNameThe name of the directory to be deleted.
Exceptions
ArgumentNullExceptionOccurs if the directory name is null or empty.

◆ ExportChild()

Stream Ofcas.Lk.Api.Client.Core.ProjectCenter.ExportChild ( ProjectInfo  projectInfo,
IEnumerable< ElevationInfo elevationInfos,
Dictionary< string, object >  parameters 
)

Exports a Project based on its ProjectInfo, list of ElevationInfo and parameters.

Parameters
projectInfoThe info of the project to be exported.
elevationInfosThe elevations to be exported.
parametersThe parameters for the export.
Returns
Returns the stream of the exported project archive.

◆ GetChild()

override Project Ofcas.Lk.Api.Client.Core.ProjectCenter.GetChild ( ProjectInfo  projectInfo)

Gets a Project based on a ProjectInfo.

Parameters
projectInfoThe ProjectInfo of the Project to be returned.
Returns
Returns a Project based on the given ProjectInfo.

◆ GetProject()

Project Ofcas.Lk.Api.Client.Core.ProjectCenter.GetProject ( ProjectInfo  projectInfo)

This method is deprecated. Please use GetChild(ProjectInfo) instead.

◆ GetProjectCenter()

ProjectCenter Ofcas.Lk.Api.Client.Core.ProjectCenter.GetProjectCenter ( ProjectDirectoryInfo  projectDirectoryInfo)

Creates a new ProjectCenter for the given directory. Each ProjectCenter belongs to a fixed directory.

Parameters
projectDirectoryInfoThe project directory to use
Returns
The new ProjectCenter
Exceptions
Exceptionif creating project-center failed (for example invalid directory)

◆ MoveFrom()

override ProjectInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.MoveFrom ( ICoreInfo  coreInfo)

Moves an object into this directory based on an info object.

Parameters
coreInfoThe info of the object to be moved.
Returns
Returns an info object of the moved / created project.

◆ Rename()

ProjectDirectoryInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.Rename ( string  directoryName)

Changes the name of this project directory to the stated name. Renaming the root directory or the recyclebin is not possible.

Parameters
directoryNameThe new name of this project directory. Cannot contain any invalid chars defined by Path.GetInvalidFileNameChars.
Returns
Returns an updated info of this project directory.

Member Data Documentation

◆ OwnDirectoryInfo

ProjectDirectoryInfo Ofcas.Lk.Api.Client.Core.ProjectCenter.OwnDirectoryInfo => _ownDirectoryInfo

Returns the directory info for the project-center


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