You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by khalidyaqoob <kh...@gmail.com> on 2011/09/14 11:46:41 UTC
Re: Jackrabbit version numbers/names
hi
please solve my problem as under:-
i want to get version names for versions created for files by using
VersionControlMethod class .
the versions get created but i am unable to retreive them.
Regards
Khalid Yaqoob
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-version-numbers-names-tp518736p3812250.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: Jackrabbit version numbers/names
Posted by khalidyaqoob <kh...@gmail.com>.
Hi
please provide some code snippets as i dont get complete idea about the code
to use foe retreiving version names..
I am struggling to create version for a file from last 15 days. Version
> is
> > getting created but I am unable to retrieve the version labels using
> code. I
> > am using httpclient and am creating version for the file using webdav.
>
> if you access the webdav server responsible for jcr-remoting you
> can make use of the protected webdav property DAV:label-name-set
> defined by DeltaV. it is exposed by all resources that represent
> a jcr version node. since DeltaV defines that property to be
> protected to have to explicitly request it in the PROPFIND call.
>
> hope that helps
> angela
>
> > I use jackrabit/apache sling. I want to retrieve version labels. Please
> help
> >
> >
> > regards
> > Ahmad
> > Kashmir
> > Srinagar Kashmir India
> >
> > Sample code i use is :-
> > public void createVersion(String un_encoded_virtual_Path){
> > String virtualPath = Utility.encodePath(un_encoded_
> > virtual_Path);
> > String remotePath = getServerRoot() + virtualPath;
> > int status;
> > try {
> > VersionControlMethod vcMethod = new
> > VersionControlMethod(remotePath);
> > executeMethod(vcMethod);
> > vcMethod.releaseConnection();
> >
> > // execute check in and check out methods
> >
> > if(urlExists(remotePath)){
> > /**
> > CheckoutMethod checkOut = new
> > CheckoutMethod(remotePath);
> > executeMethod(checkOut);
> > checkOut.releaseConnection();
> > */
> >
> > CheckinMethod checkIn = new
> CheckinMethod(remotePath);
> > executeMethod(checkIn);
> > checkIn.releaseConnection();
> > }
> >
> >
> > LabelMethod lbMethod = new
> LabelMethod(remotePath,"FLINTOFF",
> > LabelInfo.TYPE_ADD);
> > status = executeMethod(lbMethod);
> > System.out.println("status : " + status + "--" +
> > lbMethod.getResponseBodyAsString());
> >
> >
> >
> > } catch (Exception e2){
> > e2.printStackTrace();
> > }
> >
> >
> >
> > }
> > public List<VersionVo> getVersions(String
> un_encoded_virtual_Path){
>
> > List<VersionVo> lstVersions = new ArrayList<VersionVo>();
> > String virtualPath =
> Utility.encodePath(un_encoded_virtual_Path);
> > String remotePath = getServerRoot() + virtualPath;
> > try {
> > /// get versions
> > // create the report
> > // I am unable to get version names using reportmethod ,
> though
> > I get the URLS of versions
> > I want to attach version name to every version
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-version-numbers-names-tp518736p3887073.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: Jackrabbit version numbers/names
Posted by Angela Schreiber <an...@adobe.com>.
hi khalid
you can obtain the set of versions from the version history
resource associated with you version-controlled resource.
there is a protected property defined by DeltaV called DAV:version-set.
regards
angela
On 9/14/11 11:46 AM, khalidyaqoob wrote:
> hi
> please solve my problem as under:-
>
> i want to get version names for versions created for files by using
> VersionControlMethod class .
> the versions get created but i am unable to retreive them.
>
> Regards
> Khalid Yaqoob
>
> --
> View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-version-numbers-names-tp518736p3812250.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.