com.tibbo.aggregate.common.server

## Interface ServerContext<C extends ServerContext>

- All Superinterfaces:
    java.lang.Comparable<C>, Context<C>, EvaluationPoint
  All Known Subinterfaces:
    DeviceContext<C>, GroupContext<C>

      public interface ServerContext<C extends ServerContext>
      extends Context<C>

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addedToGroup(GroupContext groupContext, CallerController caller)`
    `void` | `addVisibleChild(java.lang.String path)` Add new visible child to the context.
    `void` | `alertActivated(Event alert, java.lang.Integer type)`
    `void` | `alertDeactivated(Event alert, java.lang.Integer type)`
    `boolean` | `checkPermissions(Permissions needPermissions, CallerController caller, Context accessedContext, EntityDefinition accessedEntityDefinition)`
    `void` | `createDefaultStatisticsChannels(VariableDefinition vd)`
    `void` | `eventAcknowledged(Event ev, Acknowledgement acknowledgement)`
    `void` | `eventEnriched(Event ev, Enrichment en)`
    `DataTable` | `getDefaultValue(VariableDefinition vd)` Returns default value of the variable.
    `default java.util.Collection<Context>` | `getDependentContexts(CallerController callerController)`
    `default java.util.Map<Context,java.util.Collection<java.lang.String>>` | `getDependentVariables(CallerController callerController)`
    `java.util.Set<GroupContext>` | `getGroups()`
    `java.util.Collection<java.lang.String>` | `getMembers(boolean includeSubgroups, boolean detectNestedLoop, CallerController cc)`
    `java.util.Collection<java.lang.String>` | `getMembers(boolean includeSubgroups, CallerController cc)`
    `java.lang.String` | `getShortDescription()`
    `boolean` | `hasVisibleChild(java.lang.String path)` Returns true if the context has a visible child with specified path.
    `ActionIdentifier` | `initAction(ActionDefinition def, ServerActionInput actionInput, ActionExecutionMode mode, CallerController caller, java.lang.String customActionId, boolean asDefault)`
    `void` | `removedFromGroup(GroupContext groupContext, CallerController caller)`
    `void` | `removeVariableValue(VariableDefinition vd)` Permanently deletes variable value from the database.
    `void` | `removeVisibleChild(java.lang.String path)` Remove visible child from the context.
    `void` | `setIndex(java.lang.Integer index)`
    `boolean` | `shouldBeHidden(CallerController callerController)`

    - ### Methods inherited from interface com.tibbo.aggregate.common.context.Context

      `accept, addActionDefinition, addAlias, addChild, addEventDefinition, addEventListener, addEventListener, addFunctionDefinition, addVariableDefinition, callFunction, callFunction, callFunction, callFunction, callFunction, callFunction, callFunction, destroy, destroyChild, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, get, get, getActionDefinition, getActionDefinition, getActionDefinitions, getActionDefinitions, getActionDefinitions, getChild, getChild, getChildren, getChildren, getChildrenViewPermissions, getContextManager, getDefaultActionDefinition, getDescription, getEventData, getEventDefinition, getEventDefinition, getEventDefinitions, getEventDefinitions, getEventDefinitions, getEventDefinitions, getEventDefinitions, getEventHistory, getFunctionData, getFunctionDefinition, getFunctionDefinition, getFunctionDefinitions, getFunctionDefinitions, getFunctionDefinitions, getFunctionDefinitions, getFunctionDefinitions, getGroup, getIconId, getIndex, getLocalPrimaryRoot, getLocalRoot, getMappedChildren, getMappedChildren, getName, getParent, getPath, getPeerPath, getPeerRoot, getPermissions, getRemotePath, getRemoteRoot, getRoot, getStatus, getType, getVariable, getVariable, getVariable, getVariableClone, getVariableData, getVariableDefinition, getVariableDefinition, getVariableDefinitions, getVariableDefinitions, getVariableDefinitions, getVariableDefinitions, getVariableDefinitions, getVariableObject, getVisibleChildren, getVisibleChildren, hasMappedChild, hasParent, hasVisibleChild, isContainer, isDistributed, isInitializedChildren, isInitializedEvents, isInitializedFunctions, isInitializedInfo, isInitializedStatus, isInitializedVariables, isInstallationAllowed, isMapped, isProxy, isSetupComplete, isStarted, move, removeActionDefinition, removeChild, removeChild, removeEventDefinition, removeEventListener, removeFunctionDefinition, removeVariableDefinition, setParent, setup, setVariable, setVariable, setVariable, setVariable, setVariable, setVariableField, setVariableField, setVariableField, setVariableField, start, stop, teardown, toDetailedString, updateEventDefinitions, updateFunctionDefinitions, updatePrepare, updateVariableDefinitions`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

    - ### Methods inherited from interface com.tibbo.aggregate.common.expression.EvaluationPoint

      `isDebuggingEvaluations, processEvaluation, processEvaluationError`

- - ### Method Detail

    - #### addVisibleChild

          void addVisibleChild(java.lang.String path)

      Add new visible child to the context.
      Parameters:
        `path` - Full name of the context to add as visible child of the current one.

    - #### removeVisibleChild

          void removeVisibleChild(java.lang.String path)

      Remove visible child from the context.
      Parameters:
        `path` - Full name of the visible child to remove.

    - #### hasVisibleChild

          boolean hasVisibleChild(java.lang.String path)

      Returns true if the context has a visible child with specified path.
      Parameters:
        `path` - Path to check.

    - #### getDefaultValue

          DataTable getDefaultValue(VariableDefinition vd)

      Returns default value of the variable. If it's not directly specified in the variable definition, an empty data table in the variable's format is created and returned.
      Parameters:
        `vd` - Definition of the variable those default value to return
      Returns:
        Default value of the variable

    - #### removeVariableValue

          void removeVariableValue(VariableDefinition vd)

      Permanently deletes variable value from the database. This method should be used only before variable definition is going to be removed from the context.
      Parameters:
        `vd` - Definition of variable those value should be removed.

    - #### initAction

          ActionIdentifier initAction(ActionDefinition def,
                                      ServerActionInput actionInput,
                                      ActionExecutionMode mode,
                                      CallerController caller,
                                      java.lang.String customActionId,
                                      boolean asDefault)
                               throws ContextException

      Throws:
        `ContextException`

    - #### checkPermissions

          boolean checkPermissions(Permissions needPermissions,
                                   CallerController caller,
                                   Context accessedContext,
                                   EntityDefinition accessedEntityDefinition)

    - #### getMembers

          java.util.Collection<java.lang.String> getMembers(boolean includeSubgroups,
                                                            CallerController cc)

    - #### getMembers

          java.util.Collection<java.lang.String> getMembers(boolean includeSubgroups,
                                                            boolean detectNestedLoop,
                                                            CallerController cc)

    - #### addedToGroup

          void addedToGroup(GroupContext groupContext,
                            CallerController caller)

    - #### removedFromGroup

          void removedFromGroup(GroupContext groupContext,
                                CallerController caller)

    - #### getGroups

          java.util.Set<GroupContext> getGroups()

    - #### alertActivated

          void alertActivated(Event alert,
                              java.lang.Integer type)

    - #### alertDeactivated

          void alertDeactivated(Event alert,
                                java.lang.Integer type)

    - #### shouldBeHidden

          boolean shouldBeHidden(CallerController callerController)

    - #### setIndex

          void setIndex(java.lang.Integer index)

    - #### createDefaultStatisticsChannels

          void createDefaultStatisticsChannels(VariableDefinition vd)

    - #### getShortDescription

          java.lang.String getShortDescription()

    - #### eventAcknowledged

          void eventAcknowledged(Event ev,
                                 Acknowledgement acknowledgement)
                          throws ContextException

      Throws:
        `ContextException`

    - #### eventEnriched

          void eventEnriched(Event ev,
                             Enrichment en)
                      throws ContextException

      Throws:
        `ContextException`

    - #### getDependentContexts

          default java.util.Collection<Context> getDependentContexts(CallerController callerController)
                                                              throws ContextException

      Throws:
        `ContextException`

    - #### getDependentVariables

          default java.util.Map<Context,java.util.Collection<java.lang.String>> getDependentVariables(CallerController callerController)
                                                                                               throws ContextException

      Throws:
        `ContextException`