Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

抽象类

org.joget.plugin.base.ExtDefaultPlugin

  • Under wflow在wflow-plugin-base modulebase模块下
  • Extended org扩展org.joget.plugin.base.DefaultPlugin
  • Implemented org实现了org.joget.plugin.base.Plugin and orgPlugin和org.osgi.framework.BundleActivator
  • A base abstract class that must be extended by every plugins

Method Detail

...

  • 一个基本的抽象类,必须由每个插件扩展

方法详细

抽象方法
getName
public javapublic java.lang.String getName()getName()

为插件返回唯一的名称。您可以通过提供与系统插件相同的名称覆盖现有的系统插件。Return a unique name for the plugin. You can override a existing System plugin by providing the same name as the System plugin.

getVersion
public javapublic java.lang.String getVersion()getVersion()

返回插件版本。Return plugin version.

getDescription
public javapublic java.lang.String getDescription()

Return plugin description. This value will be used when a Resource Bundle Message Key "plugin.className.pluginDesc" is not found by getI18nDescription() method.

...

getDescription()

返回插件说明。当getI18nDescription()方法找不到资源包消息密钥“ plugin.className .pluginDesc”  时,将使用此值。

可覆盖的方法
getI18nLabel
public java.lang.String getI18nLabel()getI18nLabel()

根据语言设置返回插件的插件标签。它将自动查找资源包消息密钥“ plugin.className .pluginLabel”。如果没有找到资源密钥, 如果插件也实现了Return a plugin label for the plugin based on language setting. It will auto look for Resource Bundle Message Key "plugin.className.pluginLabel". If resource key not found, org.joget.plugin.property.model.PropertyEditable.getLabel() will be use if the plugin also implemented 接口,则将使用  org.joget.plugin.property.model.PropertyEditable interface. Else, value from getName() method is use. OSGI plugin is required to override this method to provide an internationalization label..getLabel()。否则, 使用getName()方法的值。OSGI插件需要覆盖此方法才能提供国际化标签。

getI18nDescription
public java.lang.String getI18nDescription()getI18nDescription()

根据语言设置返回插件的插件描述。它将自动查找资源包消息密钥“ plugin.className .pluginDesc”。如果找不到资源密钥, 则使用Return a plugin description for the plugin based on language setting. It will auto look for Resource Bundle Message Key "plugin.className.pluginDesc". If resource key not found, value from org.joget.plugin.base.Plugin.getDescription() is use. OSGI plugin is required to override this method to provide an internationalization description. 

...

getDescription()的值  。OSGI插件需要覆盖此方法才能提供国际化描述。 

实用方法
getProperties
public java.util.Map<javaMap <java.lang.String,javaString,java.lang.Object> getProperties()

Get plugin properties.

setProperties
getProperties()

获取插件属性。

setProperties方法
public void setProperties(javasetProperties(java.util.Map<javaMap <java.lang.String,javaString,java.lang.Object> properties)properties)

设置插件属性。Set plugin properties.

getProperty
public javapublic java.lang.Object getProperty(javagetProperty(java.lang.String property)property)

通过属性键获取插件属性值。Get a plugin property value by property key.

setProperty
public void setProperty(javasetProperty(java.lang.String property, javaproperty,java.lang.Object value)value)

设置一个插件属性。Set a plugin property.

getPropertyString
public java.lang.String getPropertyString(javagetPropertyString(java.lang.String property)property)

通过属性键获取插件属性值,并返回java.lang.String。不存在的键将返回一个空字符串而不是NULL值。Get a plugin property value by property key and return in java.lang.String. Non-exist key will return an empty string instead of NULL value.

start
public void start(orgstart(org.osgi.framework.BundleContext context)context)

Method used by Felix OSGI framework to register the plugin.

stop 

Felix OSGI框架使用的方法来注册插件。

stop
public void stop(orgstop(org.osgi.framework.BundleContext context)context)

Method used by Felix OSGI framework to unregister the plugin.

...

Felix OSGI框架用于注销插件的方法。

已弃用的方法
getPluginProperties
public org.joget.plugin.base.PluginProperty [] getPluginProperties()

Return a set of plugin properties to configure by admin user.

getPluginProperties()

返回一组由admin用户配置的插件属性。

已弃用自版本3以来,Joget Workflow为插件配置引入了更好的UI。一个插件应该实现 orgDeprecated Since version 3, Joget Workflow introduced a better UI for plugin configuration. A plugin should implement org.joget.plugin.property.model.PropertyEditable interface to provide the plugin configuration options.  接口来提供插件配置选项。

execute
public java.lang.Object execute(javaexecute(java.util.Map properties)

To execute a plugin

properties)

执行插件

已弃用  此方法仅由Process Tool插件使用,因此已将其移至 orgDeprecated This method is only use by Process Tool plugin therefore it had been moved to org.joget.plugin.base.DefaultApplicationPlugin

...

接口

org.joget.plugin.property.model.PropertyEditable

  • Under wflow在wflow-plugin-base module
  • A interface that must be implemented by a plugin to provide admin interface to configure the plugin

Method Detail

...

  • base模块下
  • 一个插件必须实现的接口,以提供管理界面来配置插件

方法详细

界面方法
getLabel
public java.lang.String getLabel()getLabel()

返回插件标签。当资源束消息密钥“该值将被用于Return plugin label. This value will be used when a Resource Bundle Message Key "plugin.className.pluginlabel" is not found by getI18nLabel() method. .pluginlabel”,没有被使用  getI18nLabel()  方法。

getClassName
public java.lang.String getClassName()getClassName()

返回插件类的名称。Return Class Name for the plugin.

getPropertyOptions
public java.lang.String getPropertyOptions()getPropertyOptions()

以JSON格式返回插件属性选项。请参阅  插件属性选项Return the plugin properties options in JSON format. Please refer to Plugin Properties Options.

getProperties
public java.util.Map<javaMap <java.lang.String,javaString,java.lang.Object> getProperties()

Get plugin properties.

setProperties
getProperties()

获取插件属性。

setProperties方法
public void setProperties(javasetProperties(java.util.Map<javaMap <java.lang.String,javaString,java.lang.Object> properties)properties)

设置插件属性。Set plugin properties.

getProperty
public javapublic java.lang.Object getProperty(javagetProperty(java.lang.String property)property)

通过属性键获取插件属性值。Get a plugin property value by property key.

setProperty
public void setProperty(javasetProperty(java.lang.String property, javaproperty,java.lang.Object value)value)

设置一个插件属性。Set a plugin property.

getPropertyString
public java.lang.String getPropertyString(javagetPropertyString(java.lang.String property)

...

property)

通过属性键获取插件属性值,并返回java.lang.String。不存在的密钥需要返回空字符串而不是NULL值。