Monday, February 20, 2012

sample code for Upload file to Apache Jackrabbit

package rabbit;


import java.io.FileInputStream;
import java.io.InputStream;

import javax.jcr.Repository;
import javax.jcr.Node;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;


import org.apache.jackrabbit.JcrConstants;
import org.apache.jackrabbit.core.TransientRepository;
public class upload_rule
{


public static void main(String[] args) throws Exception
{
Repository repository = new TransientRepository();


// Code For Creating workspace in jackrabbit
//((org.apache.jackrabbit.core.WorkspaceImpl)workspace).createWorkspace("MyWorkSpace");



Session session = repository.login(new SimpleCredentials("username", "password".toCharArray()),"MyWorkSpace");
try
{

//take the file as inputstream here i fetch from "E"drive and file name rules.xls from directory arunpaul
InputStream fileStream = new FileInputStream("E:\\arunpaulk\\rules.xls");

//creating a node to save file data here i create node named "test_data"

Node root = session.getRootNode().addNode("test_data");

// Store content
Node traffic = root.addNode("traffic_data");
Node info = traffic.addNode("trafficInfo_compulsory_rules");
info.addMixin(JcrConstants.MIX_VERSIONABLE); //to set versions
info.setProperty("jcr:content", fileStream);
System.out.println("DataSaved");
session.save();

String user = session.getUserID();
System.out.println("Your in WorkSpace : "+session.getWorkspace().getName());
System.out.println("You Logd in as "+user);
System.out.println("Data out :"+info.getProperty("jcr:content").getStream().read());

//((org.apache.jackrabbit.core.WorkspaceImpl)workspace).createWorkspace("eFerns");
/* String name = repository.getDescriptor(Repository.REP_NAME_DESC);
System.out.println("Logged in as " + user + " to a " + name + " repository.");
System.out.println(node.getPath());
*/

// System.out.println(info.getProperty("trafficInfo").getString());
System.out.println(info.getBaseVersion().getName()+": version Name");
System.out.println(info.getBaseVersion().getPath()+": path");


}
finally
{
session.logout();
}
}
}

Convert GWT application to GXT sencha application

1.download eclipse helios form corresponding sites

2.go to help and choose install new software

3.go to code.google.com and select getting started check the prerequisites (Strict to the instruction manual)

4. then select setup for eclipse and copy paste the link to install software's http textbox

5.tick the hide box

6.press next button

7. next ----> accept the terms FINISH

8. check any prerequisites for gxt[ eclipse 6 and jdk 6 ( oct-2011 ) ].

9.Download the latest Ext GWT release (currently2.2.0).

http://www.sencha.com/products/gwt/download.php

10. wait for to complete the installing process in eclipse.

11.install the designer

12. Make userlib by using the downloaded gxt[ in that rename the file gxt2.22 as gxt and add that gxt jar file to user lib]

13.create a java project with gwt support. (Specify the path of Extracted(already downloaded file will extract to specific path in my case its c:\))

CREATE A PROJECT WITH GWT SUPPORT 2ND BUTTON BELOW THE FILE

GIVE PROJECT NAME------>NEXT--------->TICK THE CREATE TIC BOX ON TOP AND CHANGE THE NAME OF IMAGEVIEWER IF NECESSARY DONT FORGET CHOOSE GXT(EXT GWT)


14.copy all the files from [C:\gxt-2.2.5\resources] resources and paste it into war file of your project

15.Open the html file in war and add the following line in tag




16.OPen the xml file from client check this file is exsisting else add theis file

Sunday, February 17, 2008

Hi friends this is me arun paul.invite your attention for a few seconds
How many of u know the word meaning of "Pirate" Don't worry i will tell u "person who dishonestely copies and sells another person's work" is called pirate Did u admit when i say
u are a pirate .No i know u never admit .When u use a mp3 file its a part of pirvacy.


When donloading a song from 123musiq.com or funmaza.com,or songs.pk,how many of you
read their privacy statment bellow give the privacy statment of 123musiq.How many of you followed this statmet...No one even i

This site is owned and operated by 123musiq.com we want to make your experience online satisfying and safe.The Audio files links on this page are only for evaluation use. If you decide to download any music file or any file for evaluation, you should delete them after 24 hours. If you don't, you will have to accept any consequences.All songs links provided in this page are for trial use only. If you like the song, please go buy the CD.

Downloading at your own risk!!!


Making CD's from Wmv-files, MP3-files and Video Files is a violation of copyrights. The Wmv-files, MP3-files and Video Files on this site are for evaluation use only. If you Download Wmv-files, MP3-files or Video Files from this site please delete the files within 24 hours. If you like the song or video, please go out and buy your self a copy at the near by CD Shops. This website, its webmasters or its ISP cannot be held responsible for the consequences.


If u don't follow the statment in another countries u will punished.
sorry friends c u latter now i am going to sleep further part will published soon