Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ProjectManager

Index

Constructors

constructor

Properties

app

convert

current

current: Project

The project that is currently loaded (or in the process of loading).

filter

isLoading

isLoading: boolean

Whether project state is currently being applied.

projectLoadTimeout

projectLoadTimeout: number

projectSettleTimeout

projectSettleTimeout: number

Methods

Protected _applyMapExtent

  • _applyMapExtent(project: Project): void
  • Applies the project's extent to the application's map.

    Parameters

    Returns void

Protected _applyState

  • Applies the given state to the viewer.

    Parameters

    Returns Promise<void>

_beginLoad

  • _beginLoad(project: Project): Promise<void>
  • Parameters

    Returns Promise<void>

Protected _excludeUnsafeState

  • _excludeUnsafeState(): Promise<void>
  • Provides an opportunity to exclude certain objects from being stored in projects.

    Returns Promise<void>

Protected _exportState

  • Gets the current state of the application.

    Returns Promise<ApplicationState>

_filterApplicationState

  • Filters application state according to the filter defined by each module.

    Parameters

    Returns Promise<ApplicationState>

_finishLoad

  • _finishLoad(): void
  • Returns void

Protected _getModules

  • _getModules(): object
  • Gets all loaded the modules, keyed by name.

    Returns object

    • [moduleName: string]: any

Protected _getResource

  • _getResource(resource: string): string
  • Parameters

    • resource: string

    Returns string

Protected _initializeDiscoveryProvider

  • _initializeDiscoveryProvider(): Promise<void>
  • Returns Promise<void>

Protected _validateAgainstServiceDiscovery

  • _validateAgainstServiceDiscovery(mapService: MapService): Promise<object>
  • Validates whether or not the given map service is in the service discovery URL whitelist.

    Parameters

    Returns Promise<object>

create

  • create(name: string): Promise<Project>
  • Creates a new project containing the current state of the application.

    Parameters

    • name: string

    Returns Promise<Project>

createEmpty

  • createEmpty(name: string): Project
  • Creates a new, empty project.

    Parameters

    • name: string

    Returns Project

decodeReferences

  • Performs the inverse of encodeReferences(), i.e. turns "pointers" back into shared object references.

    Parameters

    Returns void

encodeReferences

  • Replaces shared references within the object graph with special strings that act as "pointers" to the shared object. When the object graph is serialized as JSON, this reduces the serialized footprint and also allows cycles within the object graph, which would normally cause an error.

    Parameters

    Returns void

getProject

  • getProject(project: string | Project, includeContent?: boolean): Promise<Project>
  • Gets the given project.

    Parameters

    • project: string | Project

      Either the project ID, or the actual project.

    • Optional includeContent: boolean

    Returns Promise<Project>

    A promise containing the project.

getProjectID

  • getProjectID(project: string | Project): string
  • Gets the ID of the given project.

    Parameters

    • project: string | Project

      Either the project ID, or the actual project.

    Returns string

    The project ID.

getProjectUrl

  • getProjectUrl(project: Project): string
  • Gets the URL for the given project, or null if the project does not have an ID.

    Parameters

    • project: Project

      The project to get the URL for.

    Returns string

    The project URL or null.

getSiteID

  • getSiteID(project: Project): string
  • Gets the Essentials site ID that the given project is associated with.

    Parameters

    Returns string

getViewerID

  • getViewerID(project: Project): string
  • Gets the Essentials viewer ID that the given project is associated with.

    Parameters

    Returns string

load

  • load(project: string | Project): Promise<void>
  • Loads a project.

    Parameters

    • project: string | Project

      Either the project ID, or the actual project to load.

    Returns Promise<void>

read

  • read(id: string, includeContent?: boolean): Promise<Project>
  • Reads a project from storage.

    Parameters

    • id: string

      The project ID.

    • Optional includeContent: boolean

    Returns Promise<Project>

remove

  • remove(project: string | Project): Promise<any>
  • Removes a project.

    Parameters

    • project: string | Project

      Either the project ID, or the actual project to remove.

    Returns Promise<any>

save

  • save(project: Project, updateApplicationState?: boolean): Promise<void>
  • Saves a project by updating the application state then writing to storage.

    Parameters

    • project: Project

      The project to save.

    • Optional updateApplicationState: boolean

    Returns Promise<void>

update

  • update(project: Project): Promise<void>
  • Updates an existing project with the current state of the application.

    Parameters

    Returns Promise<void>

validateProjectOwnership

  • Validates whether or not the given project is owned by the current user.

    Parameters

    Returns Promise<Project>

    A promise containing the project being validated.

write

  • Writes a project file to storage.

    Parameters

    Returns Promise<Project>