public abstract class BaseExtensionPointType extends java.lang.Object implements ExtensionPointType
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description |
protected java.lang.String |
name |
protected java.lang.String |
typeId |
Constructor and Description |
---|
BaseExtensionPointType(java.lang.String typeId,
java.lang.String nameKey,
java.lang.String descriptionKey) |
Modifier and Type | Method and Description |
---|---|
void |
addRecordInstanceActions(org.apache.wicket.markup.repeater.RepeatingView view,
IConfigPage configPage,
ConfigPanel parentPanel,
PersistentRecord mainRecord,
PersistentRecord subRecord)
Provides the extension point type an opportunity to insert custom record action links.
|
int |
compareTo(ExtensionPointType o) |
protected <T> T |
findProfileSettingsRecord(GatewayContext context,
PersistentRecord profile)
Convenience function for looking up the extension point's settings for the given profile.
|
java.lang.String |
getDescription()
A resource key for a description of what makes this type unique.
|
java.lang.String |
getName()
A resource key for a human-readable name for this type.
|
ReferenceField<?> |
getSettingsRecordForeignKey()
Returns the ReferenceField linking the extension point's settings record to the parent profile record.
|
java.lang.String |
getTypeId()
A string that uniquely identifies this profile type.
|
boolean |
isEnabled()
A flag that indicates whether this type is currently enabled (true) or deprecated (false).
|
ConfigPanel |
newRecordConfigPanel(PersistentRecord[] records,
IConfigPage configPage,
ConfigPanel parentPanel)
Creates a new ConfigPanel that will be used when the user creates a new record of this extension point type.
|
void |
onRecordDestroyed(PersistenceSession session,
PersistentRecord mainRecord,
PersistentRecord subRecord)
Will be called when a profile of this extension point type is deleted, providing an opportunity to do any related
cleanup.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSettingsRecordType
protected java.lang.String typeId
protected java.lang.String name
protected java.lang.String description
public BaseExtensionPointType(java.lang.String typeId, java.lang.String nameKey, java.lang.String descriptionKey)
typeId
- The unique ID for this profile typenameKey
- The resource key to a human-readable name of this profile typedescriptionKey
- The resource key to a description of the profile typepublic java.lang.String getTypeId()
ExtensionPointType
getTypeId
in interface ExtensionPointType
public java.lang.String getName()
ExtensionPointType
getName
in interface ExtensionPointType
public java.lang.String getDescription()
ExtensionPointType
getDescription
in interface ExtensionPointType
public boolean isEnabled()
ExtensionPointType
isEnabled
in interface ExtensionPointType
public ReferenceField<?> getSettingsRecordForeignKey()
getSettingsRecordForeignKey
in interface ExtensionPointType
public ConfigPanel newRecordConfigPanel(PersistentRecord[] records, IConfigPage configPage, ConfigPanel parentPanel)
ExtensionPointType
newRecordConfigPanel
in interface ExtensionPointType
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.public void addRecordInstanceActions(org.apache.wicket.markup.repeater.RepeatingView view, IConfigPage configPage, ConfigPanel parentPanel, PersistentRecord mainRecord, PersistentRecord subRecord)
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.
addRecordInstanceActions
in interface ExtensionPointType
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).public void onRecordDestroyed(PersistenceSession session, PersistentRecord mainRecord, PersistentRecord subRecord)
ExtensionPointType
onRecordDestroyed
in interface ExtensionPointType
public int compareTo(ExtensionPointType o)
compareTo
in interface java.lang.Comparable<ExtensionPointType>
protected <T> T findProfileSettingsRecord(GatewayContext context, PersistentRecord profile)
T
- context
- profile
-