I want to customize Jhipster code generation logic for Java where I want to call a custom audit trail service which is already developed by my organization. Whenever an entity is added/updated or deleted, I want to call that audit trail service.
Can I customize JHipster code generation so that I can modify the template which generates PUT/POST/DELETE methods for entity ? If I can modify that template and put my custom code, it will save me lot of work whenever new entities are generated.
I did not find good documentation on how to customize these templates. Can someone help?
regards,
Venky
As Gael mentioned above: Blueprints are used to customizing the code generation. Its very nice and easy way to add custom code.
Related
Introduction
I'm designing an application using Kentico 11 CMS. Client provided me with this information:
Big data are expected
Versioning and workflow would be nice to have but are not mandatory
Editing interface for the data is needed
My research
Based on Kentico out of the box capabilities, I had to decide whether to use Pages, Module classes or Custom tables to store data. I've excluded Pages as they are not advised for big data by docs. After some additional reserach I consider Custom module to be the best option for me.
Documentation states that:
Custom modules: Workflow cannot be used for your data. Versioning of the stored data is not supported by default.
Question
1) Am I able to easily bypass this restriction when using custom classes for the custom module? (meaning versioning and workflow)
2) Is there any collision when defining an interface for editing the data, while using custom classes in custom modules?
3) When defining general indexes for searching will there be any problem when using custom classes in custom modules?
You can setup versioning (https://devnet.kentico.com/articles/module-development-versioning-recycle-bin), not workflow. If you need workflow just for publishing, first you can use pages appliaction, then after page is published move the content to custom class.
You can use default UI from Kentico or you can create your own.
I don't think so, but you can create always custom index if will be something wrong with general
I'm quite new in liferay and this must have been a very basic question.
Can we make site templates deployable as standalone component like themes? If yes how can we do this? Any help or content explains how to do this will be great.
Thanks
You can export and import site templates - they'll not be deployed like themes, but you can carry them from one portal to another. Check the cogs-icon in the top-right of the Site Template configuration screen in Control-Panel and you'll find the Export/Import Actions. The individual SiteTemplate's Action button also has an Export option available.
Another option is to get familiar with Liferay's API (learn ServiceBuilder for understanding the concepts) and examine the sourcecode. A good starting point is the ancient 7cogs sample code (not all will compile as-is, this article is for an older version, but the principles will help you to understand). Also note that the article links a second follow-up article. Everything in Liferay is done through the API and you can literally automate everything - you'll "just" have to find the proper API and use it.
Site templates can be deployed in a plugin via the use of Liferay's Resources Importer.
See: https://dev.liferay.com/develop/learning-paths/themes/-/knowledge_base/6-2/importing-resources-for-your-theme for more information.
You can probably find some some examples here: https://www.liferay.com/marketplace/-/mp/category/15828894
I have a project entity and a projectStages entity. I want, when a project record will be created automatically projectStages entities will be created for each stages.Till now I was doing it using plugin.
Just wanted to know if there is any way I within the CRM to do this.
this is a screen shot of the customer security roll.
Thanks.
I would do that using plugins, is there any reason you don't want to use plugins? You could use workflows to create projectstages when a project is created too, that will be asynchronous though.
I'm trying to create a custom login portlet for liferay because I also need to do some other things such as logging. However the problem I've stumbled on is that the portal-impl.jar seems to be shielded off so I can't use the loginutil class.
Now I don't want to modify how the actual login works so this is quite a bummer.
I've read something about being able to use something like ext(the explanation was quite vague) but that didn't seem like the cleanest solution.
I've got some experience at developing portlets, but I'm new at developing for liferay.
creating an "ext plugin", as it is called, is the best way to solve your problem.
This part of the documentation should be your first step.
First, you should identify in the portal.properties the properties to modify : be it another autologin in the pipeline, or an action triggered by the login action. I often use the first one for custom SSO actions, and the latter for auditing purposes.
Then create an ext plugin with your custom class (extending loginutil, for example) and create embed the portal-ext.properties needed to reference it.
That way, you should be able to have a clean package to deploy and undeploy ; customizing the jsps of the login portlet can also be done.
Arnaud
Why do you want to use the LoginUtil class?
If you really just want to add logging to the login you can maybe just create a post-login hook. This hook will intercept each user login so you can do your custom logic such as adding some logging with the user's information.
The advantage of this approach is that your code is completely separated from Liferay.
I need to learn how to build custom workflows in SharePoint. In addition to basic stuff like having legal sign-off on documents, I need to be able to execute arbitrary custom code at certain points. For example, after legal signs off it should export the document and update a database table indicating that a new version is ready.
Is this possible using SharePoint? If so, where can I find the documentation or tutorials I would need to get started?
Getting Started Link 1,Getting Started Link 2 links will help you to get started with the SharePoint Custom Workflows. And also it is possible to do any arbitrary code inside the workflow. Also there is another type of work flow called State machine for which there is a class one article
Workflow as the whole is built using sub parts called Activities which dictates what the workflow should do at a particular point of time, I remember you have an activity called Code Activity which will help you to achieve what you want.
Robert Shelton's Workflow Video Tutorial series is very helpful:
http://rshelton.com/Tags/Workflow/default.aspx