Versions Compared

Key

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

...

Code Block
- Home
  - joget
    - plugins
    - jw-community
      -5.0.01

The "plugins" directory is the folder we will create and store all our plugins and the "jw-community" directory is where the Joget Workflow Source code stored.

...

Code Block
languagebash
cd joget/plugins/
~/joget/jw-community/5.0.01/wflow-plugin-archetype/create-plugin.sh org.joget.tutorial not_permission 5.0.01

Then, the shell script will ask us to key in a version for your plugin and ask us for confirmation before generate the maven project.

...

Code Block
languagejava
titleImplementation of all basic abstract methods
collapsetrue
package org.joget.tutorial;
 
import org.joget.apps.app.service.AppPluginUtil;
import org.joget.apps.app.service.AppUtil;
import org.joget.apps.form.model.FormPermission;
import org.joget.apps.userview.model.UserviewPermission;
 
public class NotPermission extends UserviewPermission implements FormPermission {
    
    private final static String MESSAGE_PATH = "messages/NotPermission";
 
    public String getName() {
        return "Not Permission";
    }
 
    public String getVersion() {
        return "5.0.0";
    }
 
    public String getDescription() {
        //support i18n
        return AppPluginUtil.getMessage("org.joget.tutorial.NotPermission.pluginDesc", getClassName(), MESSAGE_PATH);
    }
 
    public String getLabel() {
        //support i18n
        return AppPluginUtil.getMessage("org.joget.tutorial.NotPermission.pluginLabel", getClassName(), MESSAGE_PATH);
    }
 
    public String getClassName() {
        return getClass().getName();
    }
 
    public String getPropertyOptions() {
        return AppUtil.readPluginResource(getClassName(), "/properties/notPermission.json", null, true, MESSAGE_PATH);
    }
    
    @Override
    public boolean isAuthorize() {
        throw new UnsupportedOperationException("Not supported yet."); 
    }
}

...