liferay-7 dynamic data lists hook - liferay-7

Hi I would like to create hook on Dynamic data lists in liferay 7.
Unfortunately I am not able to achieve DDLRecordServiceWrapper, according to source code it should be accessible under
import com.liferay.dynamic.data.lists.service.DDLRecordServiceWrapper;
But this class, nor service package are resolved.
In Liferay 6.x this service was available under
com.liferay.portlet.dynamicdatalists.service.DDLRecordServiceWrapper
Is it possible to create DDL hook on liferay-7 somehow?

While using maven, this wrapper can be found inside this artifact
<dependency>
<groupId>com.liferay</groupId>
<artifactId>com.liferay.dynamic.data.lists.api</artifactId>
<version>2.1.2</version>
</dependency>
And referenced as
import com.liferay.dynamic.data.lists.service.DDLRecordServiceWrapper;
Using only liferay SDK I wasn't able to get this.

Related

Weld (CDI) and Jersey-Server(JAX-RS) Bootstrap in Java SE

I am trying to figure out how to correctly bootstrap Weld (3.0.0) together with Jersey-Server (1.19.3) to establish a Rest Server with Java SE. I am not! talking about a JEE solution. The application server does a good job here.
I would like to have it standalone without all the libs I do not need.
My problem is that jersey server instantiates all the REST service classes in his own way and not using weld. Therefore #Inject does not work of course.
Does IoCInstantiatedComponentProvider help here ?
This is something Hammock provides, but if you want to just leverage the code that's fine. That's the beauty of open source - https://github.com/hammock-project/hammock/tree/master/rest-jersey/src/main/java/ws/ament/hammock/rest/jersey
Specifically, you'll need to instantiate the JerseyServlet and provide a ServletContextAttribute with the name jersey.config.servlet.internal.resourceConfig_JerseyServlet that points to a ResourceConfig object that either points to your Application object, or has all of the classes registered within it. We use a CDI extension to scrape these classes. I will say I'm using Jersey 2 not Jersey 1, I doubt this will work with Jersey 1 (which was made for CDI 1.0). Note that you need a servlet container still.
If you want to leverage Hammock, just add these dependencies to your project (I'm using Jetty below, but you can also use embedded tomcat or undertow):
<dependency>
<groupId>ws.ament.hammock</groupId>
<artifactId>rest-jersey</artifactId>
</dependency>
<dependency>
<groupId>ws.ament.hammock</groupId>
<artifactId>bootstrap-weld3</artifactId>
</dependency>
<dependency>
<groupId>ws.ament.hammock</groupId>
<artifactId>web-jetty</artifactId>
</dependency>
And then you just have to provide some annotated rest resources and a beans.xml

Adding BouncyCastle Dependency bcprov-jdk15on-1.49.jar to iText Java Application in Eclipse Fails

I am using iText version 5.5.2 and trying to implement passwords to stop users from editing our generated static XFA pdf reports. I don't think I am able to flatten a static XFA PDF Form (so correct me if I am wrong). My only option at this point, would be to use iText's ability to password protect the form in a way where users will not have to worry about putting in a password to edit the form, but still be able to view it.
Anyway here is the problem. According to the Lowagie's book, implementing a password requires the use of the bouncastle APIs. To do this right, I implemented the iText-5.5.2. Searching through this iText dependencies, I found that the maven POM for iText-5.5.2 shows that I have a need a couple of bouncycastle jars:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.49</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.49</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
When I add these to my project within eclipse of (IBM's CICS Explorer), eclipse complains as follows:
Description Resource Path Location Type Archive for required library: 'C:/Users/nuo3545/jars/bcprov-jdk15on-1.49.jar' in project 'jCicsPdfUtility' cannot be read or is not a valid ZIP file jCicsPdfUtility Build path Build Path Problem
So this indicates that the jar being added (bcprov-jdk15on-1.49.jar) to my project properties libraries or class path is bad, or not being recognized. Is there a solution for this?
Q. Are bouncycastle jars still an issue or broken for usage within iText? What is my recourse of fix to this problem?
Any help or direction with this regard is much appreciated.

Library property, org.zkoss.zul.chart.engine.class, required

I am trying to use the charts in a Maven project for zk but get this error
Library property, org.zkoss.zul.chart.engine.class, required
On the outline the chart icon is there.
any ideas what maven dependency I need to add?
You did not mentioned which ZK version you are talking about here or its a CE or EE or any other product of ZK.
<dependency>
<groupId>org.zkoss.zkforge</groupId>
<artifactId>flashchart</artifactId>
<version>${version.zk}</version>
</dependency>
For your reference you can check ZK Chart Exception
EDIT
For further details about feature in differnt version of ZK you can check Features Comparison between CE,EE,PE version

IDE features in NetBeans platform application

I am developing application based on the NetBeans platform. I use Maven to build it and I need to provide IDE features in my app (text editing, syntax highliting for XML files and so on).
Which libraries do I need to declare as dependencies to be able to provide the editor support? And what about XML syntax highliting (or full XML files support)? I am kinda lost in those dozens of JARs. Is there any way to include whole NB cluster? (To make sure everyone gets it, once again, I use Maven.)
Thanks for any help.
Have a look at the NetBeans API index in the content section there is a short description about what each API provides. At a guess I think you're wanting to use the Editor Module and maybe the XML API
I think that if you include the following dependency you will get the entire NetBeans (This is not something that I've tried) IDE as a dependecy
<dependency>
<groupId>org.netbeans.cluster</groupId>
<artifactId>ide</artifactId>
<version>RELEASE70</version>
<type>pom</type>
</dependency>

Using Guava in a Maven GWT Project

I have a project which would like to utilize the Google Guava libraries (on both the server-side and the client-side), however, I am having trouble setting it up.
I was able to add GWT and Guava as dependencies, and my GWT projects are compiling correctly. My server-side code using Guava also works correctly.
But if I try to add it to my GWT project using the following:
<inherits name="com.google.common.collect.Collect" />
And use the application in development mode via mvn gwt:run, it brings up the Google Development Mode interface and gives errors of the flavor:
Unable to find 'com/google/common/collect/Collect.gwt.xml' on your classpath...
Presumably because the maven dependency is just the compiled class files, and not the source/.gwt.xml files it needs to compile down to the Javascript. I found that if I go to the guava website, and download the files, there is a file called guava-r08-gwt.jar, which I think is heading in the direction of a solution.
Ideally, there would be some dependency I could add in Maven that just lets me use the inherits command, but any other workarounds would be welcomed.
As mentioned in one of the answers, this is in the works.
In the meantime, I have set up a temporary public maven-repo for this purpose. I make no guarantees about it staying up, but here is the repo/dependency stuff:
<repository>
<id>deepthought</id>
<name>Deepthought Public Repository</name>
<url>http://deepthought.co/maven-repo</url>
</repository>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-gwt</artifactId>
<version>r08</version>
</dependency>
Feel free to use it for now, though.
It's in the works.
http://code.google.com/p/guava-libraries/issues/detail?id=501