Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected _allowPublicAccess

_allowPublicAccess: boolean

Protected _globalGrantIds

_globalGrantIds: string[]

Protected _isDestroyed

_isDestroyed: boolean

Protected _lastSearchResults

_lastSearchResults: Moniker[]

Protected _supportedGrantKinds

_supportedGrantKinds: string[]

app

defaultGrantKind

defaultGrantKind: string

document

document: Document

The underlying document whose grants are being edited.

editOwnership

editOwnership: Observable<boolean>

enabled

enabled: Observable<boolean>

grants

grants: Grant[]

The configured grants.

id

id: string

isValidMoniker

isValidMoniker: Observable<boolean>

Whether or not the current search text maps to a valid moniker.

libraryId

libraryId: string

monikerKinds

monikers

The monikers that have grants on the current document.

roleIconUri

roleIconUri: string

searchText

searchText: Observable<string>

selectedMoniker

selectedMoniker: Observable<Moniker>

selectedMonikerKind

selectedMonikerKind: Observable<string>

userIconUri

userIconUri: string

Methods

Protected _getSelectedMoniker

  • _getSelectedMoniker(): Moniker
  • Gets the selected moniker based off the current search text. If the text does not match the selected moniker, it will search through the last search results for monikers.

    Returns Moniker

Protected _isUserKind

  • _isUserKind(monikerKind: string): boolean
  • Whether a given moniker kind is a user kind.

    Parameters

    • monikerKind: string

      The moniker kind.

    Returns boolean

    Whether or not the kind is a user kind.

Protected _monikerExists

  • _monikerExists(moniker: Moniker): boolean
  • Checks whether or not the moniker already exists based off its ID and aliases.

    Parameters

    • moniker: Moniker

      The moniker to check whether it exists.

    Returns boolean

    Whether or not the moniker exists.

Protected _setMonikerKinds

  • _setMonikerKinds(): void
  • Returns void

Protected _updateModel

  • _updateModel(document: Document): void
  • Update the view model with the document of the given ID.

    Parameters

    Returns void

Protected _updateMonikers

  • _updateMonikers(grants: Grant[]): void
  • Updates the monikers list based off the given grants.

    Parameters

    • grants: Grant[]

      The grants to build the monikers from.

    Returns void

addGrant

  • addGrant(id: string, kind: string): Grant
  • Add a grant to the document.

    Parameters

    • id: string

      The global ID of the grant

    • kind: string

      The kind of grant.

    Returns Grant

    The grant that was added

addMoniker

  • addMoniker(): void
  • Add a moniker, updating the document with a grant for the moniker.

    Returns void

auto

  • auto(arg0: any, arg1: any, arg2: any): void
  • Binds a handler to an Observable or to a dojo.connect. Binding to an Observable:

    ``` this.auto(someObservable, function (newValue) { });

    with explicit scope:

    this.auto(someObservable, this, function (newValue) { });

    Alternately, pass an event name as a string to use dojo.connect:

    this.auto(window, "onclick", function () { }); ```

    Parameters

    • arg0: any

      Either an Observable (for observable bindings) or a regular object (if arg1 is a string)

    • arg1: any

      If arg0 is an Observable, a function or scope object. Otherwise, an event name (to use with dojo.connect).

    • arg2: any

      If arg0 is an Observable, a function handler.

    Returns void

destroy

  • destroy(): void
  • Destroys the object completely

    Returns void

destroyBindings

  • destroyBindings(): void

getResource

  • getResource(resourceKey: string, locale?: string): string
  • Gets a language resource from the Application's resource dictionary, given a key, and optional locale. Returns null if the resource does not exist.

    Parameters

    • resourceKey: string
    • Optional locale: string

      The locale of the resource to fetch. Defaults to the current application locale.

    Returns string

initialize

  • initialize(config: any): void
  • Parameters

    • config: any

    Returns void

loadById

  • loadById(id: string): Promise<void>
  • Load a document's grants from the document store and updates the view model state.

    Parameters

    • id: string

      The ID of the document to load.

    Returns Promise<void>

onDestroy

  • onDestroy(): void
  • Override or attach to provide custom clean-up behaviour.

    Returns void

onSiteInitialized

  • onSiteInitialized(): void
  • Returns void

reset

  • reset(): void
  • Set the view model state to defaults.

    Returns void

resetOptions

  • resetOptions(): void
  • Reset the search options.

    Returns void

searchMonikers

  • searchMonikers(searchTerm: string): Promise<Moniker[]>
  • Search for monikers using a given search term. These results will be limited by the currently selected moniker kind (users or roles).

    Parameters

    • searchTerm: string

      The search term to search monikers with.

    Returns Promise<Moniker[]>

    A promise containing a list of monikers.

trackCommandHandler

  • trackCommandHandler(command: any, token: any): void
  • Tracks a subscription to an {@link geocortex.framework.commands.Command}, disposing it when this object is disposed with the destroy method.

    Parameters

    • command: any
    • token: any

    Returns void

trackSubscription

  • trackSubscription(event: any, token: any): void
  • Tracks a subscription to an {@link geocortex.framework.events.Event}, disposing it when this object is disposed with the destroy method.

    Parameters

    • event: any
    • token: any

    Returns void

updateMoniker

  • updateMoniker(moniker: MonikerModel, grantKind: string): void
  • Update the moniker by updating the document grants.

    Parameters

    • moniker: MonikerModel

      The model of the moniker being updated.

    • grantKind: string

      The kind of grant to add to the document for the given moniker.

    Returns void

validateSearchInput

  • validateSearchInput(): void
  • Validates the search input.

    Returns void