Friday, December 23, 2011

Install Entando on Netbeans

Hi to all,
yes again here speaking about  Entando, after installing it with maven (First step with Entando ), now we go to install Entando using NetBeans 7.01

  java, postgresql, tomcat, NetBeans 7.01 are all present on the PC.
  a postgresql user agile with password agile is configured
  1. Start Netbeans
  2. Create New Project
  3. Select Maven - Project From Archetype click Next
  4. Select Archetypes from Remote Repository
  5. Select Entando: Archetype For Generic Portal (the version number can be different)
  6. Click next and complete the form

yes we've just create a project based on Entando (whow very simple and fast).

Another few important steps
 1. create the db:
  1.1 in your project expand the build.xml file
  1.2 execute  PG-db-full-update this task create the db used by the project

 2. run the project
  2.1 click on run project select your webapp server I suggest tomcat 6.xx

  if all it's ok you'll see this page

  login as suggested in the web page and you see the administration console

Fine yes?
Simple poprtal with no plugin so next question is How can I insert a plugin in my project/portal?
first read the entando guide:
  How to add some Plugins to my own portal based on mavenized Entando  on GitHub

Read it?
Ok, go back to NetBeans
stop tomcat and open pom.xml file
insert the code you find in the entando guide and your pom.xml will look like this

pay attention to change the version (here we have 0.0.1-SNAPSHOT) to the last one, how? easy select 0.0.1-SNAPSHOT  and click ctrlspacebar and Netbeans will suggest you the last number version.
Save the pom.xml file, clean and build your project.

Now it's time to update the db to be compliant with the plugin inserted in the project, so expand the build.xml file and execute the task PG-db-restore-plugins

Run the projcet, login and you can see the plugin in the list.

et voilĂ , very simple and easy.

Now it's Christmas time so
Happy Christmas to all 


Friday, December 16, 2011

First step with Entando

The new version of Entando is out and as reported in the following post "Enter Maven and GitHub"   mMven and GitHub are used.

mmm ... Maven?
question: how do I install / use the new version of Entando?
answer: ?????

So I started studying a bit of Maven, read the blog posts, wikis, tested,...

So the result is I can install and deploy a portal based on Entando in a few minutes
  java, postgresql, tomcat are all present on the PC.
  a postgresql user agile with password agile is configured .
1. Install maven
2. open a terminal
3. create a directory for the project you want to create
3. cd into the directory you just created
4. type mvn archetype: generate-Dfilter = entando
5. answer the following questions:
5.1 Choose archetype:
1: remote -> org.entando.entando: entando-archetype-plugin-generic (Generic Archetype Plugin for Entando: an agile, modern and user-centric open source portal platform.)
2: remote -> org.entando.entando: entando-generic-portal-archetype (Archetype for Entando Generic Portal: an agile, modern and user-centric open source portal platform.)
Choose a number or apply filter (format: [groupId:] artifactId, contains case sensitive):
choose 2

Choose org.entando.entando: entando-portal-archetype-generic version:
2: 2.4.0
Choose a number: 2:
choose 1 [the list of version may differ we're now on version 4.0]
Define value for property 'groupId':: it.testentando
Define value for property 'artifactId':: testentando
Define value for property 'version': 1.0-SNAPSHOT: (accept default)
Define value for property 'package': it.testentando: (accept default)
displays the list of choices if you run press Y otherwise press N and repeat from step 5.1
That's all now we have a folder containing the created project (in this case testentando).
6.Populate the db
6.1 Configure the buildProperties.xml for your Operatin System
6.2 open a  terminal and type
cd testentando
ant  PG-db-full-update 
This step is not required , no postgres is require for the first run.

7. last step:
in the folder src/main/filters check the properties file to ensure that the configurations of Tomcat and the postgresql password is correct (in case you doesn't use agile/agile).

Now you're ready to start the portal.
  mvn clean jetty:run 


et voilĂ  Entando is running

            The Entando wiki on GitHub
            Entando download

Wednesday, December 14, 2011

Replication stars

Datacharmer post:
Working with replication, you come across many topologies, some of them sound and established, some of them less so, and some of them still in the realm of the hopeless wishes. I have been working with replication for almost 10 years now, and my wish list grew quite big during this time. In the last 12 months, though, while working at Continuent, some of the topologies that I wanted to work with have moved from the cloud of wishful thinking to the firm land of things that happen. My quest for star replication starts with the most common topology. One master, many slaves (...)

Monday, December 12, 2011

Pentaho Dynamic setting Y-Axis

Working on Entando / Pentaho integration, one of the customer request was :
"I needed to be able to change the minimum and maximum Y-axis at run time."

  • Below the solution I've used:
  • create reports
  • insert the chart
  • open the properties window
  • in the scripting language choose BeanShell
  • insert the following script

import org.jfree.chart.*;
import org.jfree.chart.axis.NumberAxis;
import java.lang.Double;
data = runtime.getData();
minVal =999999.0;
maxVal = 0.0;
for (int i=0;i latteProd = data.getValueAt(i,2);
if(latteProd < minVal){
minVal = latteProd;
if(latteProd > maxVal){
maxVal = latteProd;
xyPlot = chart.getPlot();
NumberAxis domain = (NumberAxis) xyPlot.getRangeAxis();
domain.setRange((minVal - (minVal*.10)), (maxVal+ (maxVal*.10)));