Class PluginDefinitionData

    • Field Detail

      • removedBy

        private Integer removedBy
      • entryDate

        private Date entryDate
      • MAX_CLASSNAME_LENGTH

        public static final int MAX_CLASSNAME_LENGTH
        The maximum length of the class name that can be stored in the database.
        See Also:
        Constant Field Values
      • className

        private String className
      • jarFile

        private String jarFile
      • MAX_NAME_LENGTH

        public static final int MAX_NAME_LENGTH
        The maximum length of the name that can be stored in the database.
        See Also:
        Constant Field Values
      • MAX_DESCRIPTION_LENGTH

        public static final int MAX_DESCRIPTION_LENGTH
        The maximum length of the url that can be stored in the database.
        See Also:
        Constant Field Values
      • description

        private String description
      • MAX_VERSION_LENGTH

        public static final int MAX_VERSION_LENGTH
        The maximum length of the version that can be stored in the database.
        See Also:
        Constant Field Values
      • version

        private String version
      • MAX_COPYRIGHT_LENGTH

        public static final int MAX_COPYRIGHT_LENGTH
        The maximum length of the copyright notice that can be stored in the database.
        See Also:
        Constant Field Values
      • copyright

        private String copyright
      • MAX_CONTACT_LENGTH

        public static final int MAX_CONTACT_LENGTH
        The maximum length of the contact information that can be stored in the database.
        See Also:
        Constant Field Values
      • contact

        private String contact
      • MAX_EMAIL_LENGTH

        public static final int MAX_EMAIL_LENGTH
        The maximum length of the email address that can be stored in the database.
        See Also:
        Constant Field Values
      • MAX_URL_LENGTH

        public static final int MAX_URL_LENGTH
        The maximum length of the url that can be stored in the database.
        See Also:
        Constant Field Values
      • mainType

        private int mainType
      • disabled

        private boolean disabled
      • interactive

        private boolean interactive
      • supportsConfigurations

        private boolean supportsConfigurations
      • requiresConfiguration

        private boolean requiresConfiguration
      • usePermissions

        private boolean usePermissions
      • trusted

        private boolean trusted
      • maxMemory

        private Long maxMemory
      • allowImmediateExecution

        private boolean allowImmediateExecution
      • useInternalJobQueue

        private boolean useInternalJobQueue
    • Constructor Detail

      • PluginDefinitionData

        public PluginDefinitionData()
    • Method Detail

      • setAnnotationSet

        public void setAnnotationSet​(AnnotationSetData annotationSet)
        Description copied from interface: AnnotatableData
        Change the annotation set. Use null to remove the annotations.
        Specified by:
        setAnnotationSet in interface AnnotatableData
        Parameters:
        annotationSet - Annotation set to change to.
      • getAnnotations

        public Set<AnnotationLink> getAnnotations()
        Description copied from interface: AnnotatableData
        Short-cut to all annotations belonging to this item. Used for HQL queries only. This is the inverse end. NOTE! The property-ref="annotationSet" require that AnnotationSetData implements Serializable
        Specified by:
        getAnnotations in interface AnnotatableData
      • getEntryDate

        public Date getEntryDate()
        Description copied from interface: RegisteredData
        Get the date this item was added to the database. The value is generated at creation time and can't be modified later.
        Specified by:
        getEntryDate in interface RegisteredData
      • setEntryDate

        public void setEntryDate​(Date entryDate)
      • getClassName

        public String getClassName()
        Get the class name of the Java class that implements this plugin. The specified class must implement the Plugin interface.
        Returns:
        The class name for this plugin
        Hibernate: property
        column="`class_name`" type="string" length="255" not-null="true" unique="true"
      • setClassName

        public void setClassName​(String className)
      • getJarFile

        public String getJarFile()
        Get the file name of the JAR file where the plugin class is located. The JAR file must be located in the 'plugins.dir' folder specified in base.config. If the value is null the plugin must be in the classpath (eg. WEB-INF/lib).
        Returns:
        The class name for this plugin
        Since:
        3.0
        Hibernate: property
        column="`jar_file`" type="string" length="255" not-null="false"
      • setJarFile

        public void setJarFile​(String jarFile)
      • getName

        public String getName()
        Get the name of the plugin.
        Specified by:
        getName in interface NameableData
        Overrides:
        getName in class CommonData
        Returns:
        A string with the name of the plugin
        Hibernate: property
        column="`name`" type="string" length="255" not-null="true"
      • setName

        public void setName​(String name)
        Description copied from interface: NameableData
        Set the name of the item. The name cannot be null and mustn't be longer than the value specified by the MAX_NAME_LENGTH constant.
        Specified by:
        setName in interface NameableData
        Overrides:
        setName in class CommonData
        Parameters:
        name - The new name for the item
      • getDescription

        public String getDescription()
        Get a description of the plugin.
        Specified by:
        getDescription in interface NameableData
        Overrides:
        getDescription in class CommonData
        Returns:
        A string with a description, or null if not known
        Hibernate: property
        column="`description`" type="text" not-null="false"
      • getVersionString

        public String getVersionString()
        Get the version of the plugin.
        Returns:
        A string with the version of the plugin, or null if not known
        Hibernate: property
        column="`version_string`" type="string" length="255" not-null="false"
      • setVersionString

        public void setVersionString​(String version)
      • getCopyright

        public String getCopyright()
        Get a copyright notice for the plugin.
        Returns:
        A string with a copyright notice, or null if not known
        Hibernate: property
        column="`copyright`" type="string" length="255" not-null="false"
      • setCopyright

        public void setCopyright​(String copyright)
      • getContact

        public String getContact()
        Get contact information for the plugin.
        Returns:
        A string with contact information, or null if not known
        Hibernate: property
        column="`contact`" type="string" length="255" not-null="false"
      • setContact

        public void setContact​(String contact)
      • getEmail

        public String getEmail()
        Get an email address that can be used to get more information about the plugin.
        Returns:
        A string with the email address, or null if not known
        Hibernate: property
        column="`email`" type="string" length="255" not-null="false"
      • setEmail

        public void setEmail​(String email)
      • getUrl

        public String getUrl()
        Get a URL with more information about the plugin.
        Returns:
        A string containing the URL, or null if not known
        Hibernate: property
        column="`url`" type="string" length="255" not-null="false"
      • setUrl

        public void setUrl​(String url)
      • getMainType

        public int getMainType()
        Get the main type of plugin.
        Returns:
        A type code that is defined in the enum Plugin.MainType.
        Hibernate: property
        column="`type`" type="int" not-null="true"
      • setMainType

        public void setMainType​(int mainType)
      • isDisabled

        public boolean isDisabled()
        If the plugin is enabled or disabled. // Mapped in hibernate-properties-PluginDefinitionData.xml since annotation doesn't support a default value
        Since:
        3.0
      • setDisabled

        public void setDisabled​(boolean disabled)
      • isInteractive

        public boolean isInteractive()
        If the plugin is interactive or not.
        Hibernate: property
        column="`interactive`" type="boolean" not-null="true"
      • setInteractive

        public void setInteractive​(boolean interactive)
      • getSupportsConfigurations

        public boolean getSupportsConfigurations()
        If the plugin supports configurations or not.
        Hibernate: property
        column="`supports_config`" type="boolean" not-null="true"
      • setSupportsConfigurations

        public void setSupportsConfigurations​(boolean supportsConfigurations)
      • getRequiresConfiguration

        public boolean getRequiresConfiguration()
        If the plugin requires a configurations or not. Requires that the plugin supports configurations.
        Hibernate: property
        column="`requires_config`" type="boolean" not-null="true"
      • setRequiresConfiguration

        public void setRequiresConfiguration​(boolean requiresConfiguration)
      • getUsePermissions

        public boolean getUsePermissions()
        If the permissions for this plugin should be used or not.
        Hibernate: property
        column="`use_permissions`" type="boolean" not-null="true"
      • setUsePermissions

        public void setUsePermissions​(boolean usePermissions)
      • getGuiContexts

        public Set<GuiContextData> getGuiContexts()
        The item code for all items where it makes sense to use the plugin in a client application. Ie. a plugin that imports reporters should return a set containing the code for Item.REPORTER.
        Hibernate: set
        table="`PluginDefinitionGuiContexts`" lazy="true"
        Hibernate: collection-key
        column="`plugindefinition_id`"
        Hibernate: collection-composite-element
        class="net.sf.basedb.core.data.GuiContextData"
      • getPluginTypes

        public Set<PluginTypeData> getPluginTypes()
        The plugin types of this plugin, ie. all interfaces that it implements.
        Hibernate: set
        table="`PluginDefinitionTypes`" lazy="true"
        Hibernate: collection-key
        column="`plugindefinition_id`"
        Hibernate: collection-many-to-many
        column="`plugintype_id`" class="net.sf.basedb.core.data.PluginTypeData"
      • getPermissions

        public Map<RoleKeyData,​PluginPermission> getPermissions()
        Get a map containing the rolekey and the permissions for this plugin.
        Hibernate: map
        table="`PluginKeys`" lazy="true" cascade="delete"
        Hibernate: index-many-to-many
        column="`key_id`" class="net.sf.basedb.core.data.RoleKeyData"
        Hibernate: collection-key
        column="`plugindefinition_id`"
        Hibernate: collection-composite-element
        class="net.sf.basedb.core.data.PluginPermission"
      • isTrusted

        public boolean isTrusted()
        If the plugin should be trusted or not.
        Hibernate: property
        column="`trusted`" type="boolean" not-null="true"
      • setTrusted

        public void setTrusted​(boolean trusted)
      • getMaxMemory

        public Long getMaxMemory()
        The max amount of memory the plugin can use. If the value is null the job agent is free to choose an appropriate value.
        Hibernate: property
        column="`max_memory`" type="long" not-null="false"
      • setMaxMemory

        public void setMaxMemory​(Long maxMemory)
      • getJobAgentSettings

        Set<JobAgentSettingsData> getJobAgentSettings()
        This is the inverse end.
        See Also:
        JobAgentSettingsData.getPluginDefinition()
        Hibernate: set
        inverse="true" lazy="true" cascade="delete"
        Hibernate: collection-key
        column="`plugindefinition_id`"
        Hibernate: collection-one-to-many
        class="net.sf.basedb.core.data.JobAgentSettingsData"
      • getAllowImmediateExecution

        public boolean getAllowImmediateExecution()
        If the plugin is allowed to be immediately executed or if it must be added to the job queue.
        Since:
        2.2
        Hibernate: property
        column="`allow_immediate`" type="boolean" not-null="true"
      • setAllowImmediateExecution

        public void setAllowImmediateExecution​(boolean allowImmediateExecution)
      • getUseInternalJobQueue

        public boolean getUseInternalJobQueue()
        If the plug-in can be executed with the internal job queue or not. If FALSE is used, the plug-in can only be executed by a job agent or other external tool.
        Since:
        2.5
        Hibernate: property
        column="`use_internal_queue`" type="boolean" not-null="true"
      • setUseInternalJobQueue

        public void setUseInternalJobQueue​(boolean useInternalJobQueue)