Customizations are the essence of Liferay, and Gogoshell can likewise be tailored to your specifications.
Felix Gogo shell basic commands and Liferay instructions are executed by the Gogo shell. Both the command line and the Control Panel provide access to the Gogo shell. There are numerous built-in Liferay commands that we can utilize in the Gogo shell. Have you considered using a custom Gogoshell command on Liferay, though?
Yes, you can create one component class in Liferay to define custom Gogo shell commands.
Here you go.
Include the dependency listed below in your module project.
|
For the custom Gogo shell command, create a component class.
Add the component declaration below.
@Component(
property = {"osgi.command.function = reloadPickListGogoShellCommand", "osgi.command.scope=picklist"},
service = OSGiCommands.class
)
|
Make sure the "OSGiCommands" class is implemented in your class.
public class ReloadPickListGogoShellCommand implements OSGiCommands {
|
For your function, now construct a method. We'll create the "reloadPickListGogoShellCommand" method in our example
|
Your class should now appear as follows:
|
Great, go ahead and deploy this module. Use the gogo shell to carry out the command.
It is now ready for you to use by writing your logic into a method.