Class BaseExtensionPointType

    • Field Detail

      • typeId

        protected java.lang.String typeId
      • name

        protected java.lang.String name
      • description

        protected java.lang.String description
    • Constructor Detail

      • BaseExtensionPointType

        public BaseExtensionPointType​(java.lang.String typeId,
                                      java.lang.String nameKey,
                                      java.lang.String descriptionKey)
        Parameters:
        typeId - The unique ID for this profile type
        nameKey - The resource key to a human-readable name of this profile type
        descriptionKey - The resource key to a description of the profile type
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: ExtensionPointType
        A resource key for a human-readable name for this type. Required.
        Specified by:
        getName in interface ExtensionPointType
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: ExtensionPointType
        A resource key for a description of what makes this type unique. Null or empty string allowed for no description.
        Specified by:
        getDescription in interface ExtensionPointType
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: ExtensionPointType
        A flag that indicates whether this type is currently enabled (true) or deprecated (false). Useful for when you want to discontinue the use of a profile, but it needs to stick around for backwards-compatibility purposes. A false value will prevent users from making new instances of this type.
        Specified by:
        isEnabled in interface ExtensionPointType
      • getSettingsRecordForeignKey

        public ReferenceField<?> getSettingsRecordForeignKey()
        Returns the ReferenceField linking the extension point's settings record to the parent profile record. Assumes the field name is "Profile". In other words, every Extension Point settings record should have a ReferenceField name "Profile", pointing to its parent profile.
        Specified by:
        getSettingsRecordForeignKey in interface ExtensionPointType
      • newRecordConfigPanel

        public ConfigPanel newRecordConfigPanel​(PersistentRecord[] records,
                                                IConfigPage configPage,
                                                ConfigPanel parentPanel)
        Description copied from interface: ExtensionPointType
        Creates a new ConfigPanel that will be used when the user creates a new record of this extension point type. Will be shown after the extension point choice panel.
        Specified by:
        newRecordConfigPanel in interface ExtensionPointType
        Parameters:
        records - Length will be 1 or 2. Index 0 will always contain the master record for the extension point manager. Index 1 will contain the extension-point specific sub-record (if applicable)
        configPage - The parent IConfigPage that can be used to navigate to new config panels.
        parentPanel - The parent RecordActionTable that should be returned to when the configuration is complete.
        Returns:
        A new ConfigPanel, or null to indicate that no custom configuration is desired, and a standard RecordEditForm should be used.
      • addRecordInstanceActions

        public void addRecordInstanceActions​(org.apache.wicket.markup.repeater.RepeatingView view,
                                             IConfigPage configPage,
                                             ConfigPanel parentPanel,
                                             PersistentRecord mainRecord,
                                             PersistentRecord subRecord)
        Description copied from interface: ExtensionPointType

        Provides the extension point type an opportunity to insert custom record action links. Will appear between "edit" and "delete".

        Note: This method changed in 7.9. Previously, the method was called "getRecordInstanceActions", and returned a list of actions. Now, it must add its actions directly to the provided view.

        Specified by:
        addRecordInstanceActions in interface ExtensionPointType
        Parameters:
        view - The RepeatingView that the action will be added to. Use "view.newChildId()" to get the id for your action, and then add the action to the view.
        configPage - The IConfigPage that will hold the ConfigPanel returned by the action when clicked.
        parentPanel - The ConfigPanel that the link will live on. Used to navigate back, if necessary.
        mainRecord - The main profile record.
        subRecord - The sub-settings profile record (if any).
      • findProfileSettingsRecord

        protected <T> T findProfileSettingsRecord​(GatewayContext context,
                                                  PersistentRecord profile)
        Convenience function for looking up the extension point's settings for the given profile. Relies on getSettingsRecordForeignKey() to get the reference field for the settings record.