Class AbstractApplicationPlugin

java.lang.Object
org.codice.ddf.admin.application.plugin.AbstractApplicationPlugin
All Implemented Interfaces:
ApplicationPlugin

public class AbstractApplicationPlugin extends Object implements ApplicationPlugin
Handles the basic work for an AbstractApplicationPlugin.
  • Field Details

    • displayName

      protected String displayName
      the display name. Protected so implementers can set this.
    • iframeLocation

      protected URI iframeLocation
      the location of the iframe. Protected so implementers can set this.
  • Constructor Details

    • AbstractApplicationPlugin

      public AbstractApplicationPlugin()
      Constructor.
  • Method Details

    • getAssocations

      public List<String> getAssocations()
      Returns a list of applications that this plugin should be associated with..
      Specified by:
      getAssocations in interface ApplicationPlugin
      Returns:
      a list of applications that this plugin should be associated with.
    • getDisplayName

      public String getDisplayName()
      Returns the display name. This is the value that will be display to the user..
      Specified by:
      getDisplayName in interface ApplicationPlugin
      Returns:
      the display name.
    • getIframeLocation

      public String getIframeLocation()
      Returns the iframe location. Can be null..
      Specified by:
      getIframeLocation in interface ApplicationPlugin
      Returns:
      the iframe location.
    • toJSON

      public Map<String,Object> toJSON()
      Utility method that will handle the conversion of this object to something jolokia can convert to json..
      Specified by:
      toJSON in interface ApplicationPlugin
      Returns:
      a constructed map that jolokia can convert to json.
    • matchesAssocationName

      public boolean matchesAssocationName(String appName)
      Handles figuring out if this plugin is matching to the app name sent in. This will handle the case where a plugin should be used for all..
      Specified by:
      matchesAssocationName in interface ApplicationPlugin
      Returns:
      yes if the application matches, or should be applied to all applications, false if it doesn't.
    • getID

      public UUID getID()
      Returns the id of this plugin. This is an unique identifier for the front end javascript..
      Specified by:
      getID in interface ApplicationPlugin
      Returns:
      a unique identifier for this plugin as a uuid.
    • setAssociations

      public void setAssociations(List<String> applicationAssociations)
      Sets the application assocations to the inputted values. This will overwrite all previous values..
      Specified by:
      setAssociations in interface ApplicationPlugin
    • addAssociations

      public void addAssociations(String applicationAssocation)
      Adds a single application association to this plugin. If the application is already there, then nothing will happen..
      Specified by:
      addAssociations in interface ApplicationPlugin
    • addAssocations

      public void addAssocations(List<String> applicationAssociations)
      Adds an application assocation list to the existing list. This does not overwrite the previous values, and if there is an existing value it wont add it..
      Specified by:
      addAssocations in interface ApplicationPlugin
    • setIframeLocation

      protected void setIframeLocation(URI iframeLocation)
    • setDisplayName

      protected void setDisplayName(String displayName)