Class GlobalProps

java.lang.Object
com.inductiveautomation.ignition.common.project.GlobalProps

public class GlobalProps extends Object
A serialized property resource that is defined by the framework itself, and holds some of the core project properties.
  • Field Details

  • Constructor Details

    • GlobalProps

      @Deprecated public GlobalProps()
      Deprecated.
      Default constructor for serialization.

      This should not be invoked unless by deserialization.

      See Also:
  • Method Details

    • newInstance

      public static GlobalProps newInstance()
      Create a new GlobalProps instance.
      Returns:
      a new instance of GlobalProps.
    • getDefaultDatasourceName

      public String getDefaultDatasourceName()
    • setDefaultDatasourceName

      public void setDefaultDatasourceName(String defaultDatasourceName)
    • getDefaultSQLTagsProviderName

      public String getDefaultSQLTagsProviderName()
    • setDefaultSQLTagsProviderName

      public void setDefaultSQLTagsProviderName(String defaultSqlTagsProviderName)
    • getAuthProfileName

      public String getAuthProfileName()
    • setAuthProfileName

      public void setAuthProfileName(String authProfileName)
    • isAuditingEnabled

      public boolean isAuditingEnabled()
    • setAuditingEnabled

      public void setAuditingEnabled(boolean auditingEnabled)
    • getAuditProfileName

      public String getAuditProfileName()
    • setAuditProfileName

      public void setAuditProfileName(String auditProfileName)
    • getSqltagsClientPollRate

      public int getSqltagsClientPollRate()
    • setSqltagsClientPollRate

      public void setSqltagsClientPollRate(int sqltagsClientPollRate)
    • getRequiredRoles

      public List<String> getRequiredRoles()
    • setRequiredRoles

      public void setRequiredRoles(List<String> requiredRoles)
    • setCommitMessageMode

      public void setCommitMessageMode(ProjectCommitMessageMode commitMessageMode)
    • setRequiredPublishRoles

      @Deprecated public void setRequiredPublishRoles(List<String> requiredPublishRoles)
      Deprecated.
    • setPublishMode

      @Deprecated public void setPublishMode(ProjectPublishMode publishMode)
      Deprecated.
    • setRequiredCopyRoles

      @Deprecated public void setRequiredCopyRoles(List<String> requiredCopyRoles)
      Deprecated.
      The property requiredCopyRoles has been removed. This method is here to stop serialization issues.
    • setRequiredExportRoles

      @Deprecated public void setRequiredExportRoles(List<String> requiredExportRoles)
      Deprecated.
      The property requiredExportRoles has been removed. This method is here to stop serialization issues.
    • getRequiredSaveRoles

      public List<String> getRequiredSaveRoles()
    • setRequiredSaveRoles

      public void setRequiredSaveRoles(List<String> requiredSaveRoles)
    • getRequiredViewRoles

      public List<String> getRequiredViewRoles()
    • setRequiredViewRoles

      public void setRequiredViewRoles(List<String> requiredViewRoles)
    • getRequiredDeleteRoles

      public List<String> getRequiredDeleteRoles()
    • setRequiredDeleteRoles

      public void setRequiredDeleteRoles(List<String> requiredDeleteRoles)
    • getRequiredResourceRoles

      public List<String> getRequiredResourceRoles()
    • setRequiredResourceRoles

      public void setRequiredResourceRoles(List<String> requiredResourceRoles)
    • isPermissionEnabled

      public boolean isPermissionEnabled(String id)
    • setPermissionEnabled

      public void setPermissionEnabled(String id, boolean enabled)
    • getRequiredClientRoles

      public String getRequiredClientRoles(String id)
    • setRequiredClientRoles

      public void setRequiredClientRoles(String id, String roles)
    • setIdp

      @Deprecated(forRemoval=true, since="2027.02") public void setIdp(String idp)
      Deprecated, for removal: This API element is subject to removal in a future version.
      retained solely so pre-2027 single-IdP configs can still be deserialized; new configs are written to idps via setIdps(List).
      Migrates the legacy single-IdP scalar from pre-2027 project configs into idps. This is the only place the deprecated scalar is read, and there is no corresponding getter, so the value is never re-serialized once migrated.

      The fold is a no-op when idps is already populated (i.e. a config written by 2027+ that also still carries the legacy element), so the list always wins.

      The name is folded in verbatim. An upgrade to 2027 starts from an 8.3 baseline, and 8.3 stores IdP names exactly as configured and resolves them by exact (case-insensitive) name, so rewriting the name here would point the project at an IdP that does not exist. Note that Perspective's AuthChallengeActionConfig still sanitizes its own legacy IdP reference: unlike this scalar, it serializes a version, so it can tell an 8.1-authored config (whose IdP name was sanitized when the IdP itself migrated to 8.3) from an 8.3-authored one. See IGN-16769.

      Parameters:
      idp - the legacy single Identity Provider name; ignored when null/blank.
    • getIdps

      public List<ProjectIdentityProvider> getIdps()
      Returns the ordered list of Identity Providers for this project. The legacy single-IdP scalar from pre-2027 configs is folded into this list on deserialization, so it is the single canonical source.
      Returns:
      the ordered list of Identity Providers for this project. never null.
    • setIdps

      public void setIdps(List<ProjectIdentityProvider> idps)
      Sets the ordered list of Identity Providers for this project. The list is run through normalizeIdps(List), so callers (the config REST API, Edge project creation, the legacy-scalar migration fold, and any future config UI) cannot persist a null or nameless entry.
      Parameters:
      idps - the ordered list of Identity Providers; null is treated as an empty list.
    • normalizeIdps

      public static List<ProjectIdentityProvider> normalizeIdps(List<ProjectIdentityProvider> idps)
      Normalizes an incoming Identity Provider list down to the entries that may be persisted, by running each through normalizeIdp(ProjectIdentityProvider) and dropping the entries that normalize to null (null entries, and entries with a null or blank name). This is the single normalization applied by setIdps(List); it is exposed so that callers comparing an incoming list against a stored (already-normalized) one can normalize both sides consistently. It also protects downstream consumers such as Perspective, which flattens this list to names and rejects null elements.
      Parameters:
      idps - the raw Identity Provider list; null is treated as an empty list.
      Returns:
      a new mutable list containing only the named entries, in their original order. never null.
    • getUnauthenticatedIdp

      public ProjectIdentityProvider getUnauthenticatedIdp()
      Returns the Identity Provider whose security-level rules apply to unauthenticated (anonymous) Perspective sessions, exactly as configured. It does not have to be one of this project's IdPs, and there is no fallback: when no unauthenticated IdP has been explicitly configured this returns null, and anonymous sessions are granted no IdP-based security levels.
      Returns:
      the configured unauthenticated-user Identity Provider, or null if none is set.
    • setUnauthenticatedIdp

      public void setUnauthenticatedIdp(ProjectIdentityProvider unauthenticatedIdp)
      Sets the Identity Provider whose security-level rules apply to unauthenticated (anonymous) Perspective sessions. It need not be one of this project's IdPs. The value is run through normalizeIdp(ProjectIdentityProvider), so a null or blank-named entry is stored as null ("no fallback") rather than an unmatchable nameless IdP.
      Parameters:
      unauthenticatedIdp - the unauthenticated-user Identity Provider; may be null.
    • normalizeIdp

      public static ProjectIdentityProvider normalizeIdp(ProjectIdentityProvider idp)
      Normalizes a single Identity Provider entry to the value that may be persisted: an entry that is null, or whose name is null or blank, is treated as "none" and collapsed to null. This is the single definition of a valid IdP entry: setUnauthenticatedIdp(ProjectIdentityProvider) applies it to the unauthenticated scalar (so it round-trips with getUnauthenticatedIdp(), which returns null when unset and applies no fallback), and normalizeIdps(List) applies it per element. It is exposed so that callers comparing an incoming value against a stored (already-normalized) one can normalize both sides consistently.
      Parameters:
      idp - the raw Identity Provider entry; may be null.
      Returns:
      the entry when it carries a non-blank name, otherwise null.
    • isForceIdpAuth

      public boolean isForceIdpAuth()
    • setForceIdpAuth

      public void setForceIdpAuth(boolean forceIdpAuth)
    • isAutoIdpAuth

      public boolean isAutoIdpAuth()
    • setAutoIdpAuth

      public void setAutoIdpAuth(boolean autoIdpAuth)
    • getPermissionEnabledMap

      public Map<String,Boolean> getPermissionEnabledMap()
    • setPermissionEnabledMap

      public void setPermissionEnabledMap(Map<String,Boolean> permissionEnabledMap)
    • getRequiredClientRolesMap

      public Map<String,String> getRequiredClientRolesMap()
    • setRequiredClientRolesMap

      public void setRequiredClientRolesMap(Map<String,String> requiredClientRolesMap)
    • isLegacyProject

      public boolean isLegacyProject()
    • setLegacyProject

      public void setLegacyProject(boolean legacyProject)
    • getRequiredClientRolesAsList

      public List<ZoneRoleRequirement> getRequiredClientRolesAsList(String id)
      Turns the comma-separated string into a list. Does its best to decipher zone/role if included
      Parameters:
      id - Permissions id
      Returns:
      Required client zone/roles as list. Not null.
    • toResource

      public Resource toResource(String projectName)