jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From parvez12 <parve...@gmail.com>
Subject Re: version creation using httpclient
Date Thu, 29 Sep 2011 11:38:09 GMT
Hi,
Does any body know how to create a named version using webdav in
jackrabbit/sling.
I am have been struggling on it for a month. The project committers even do
not know what is the exact way to do it.
I my self have 12 years software development .Pleas if you do not know it,
just make me as a support guy so that i can identify the issues and create
detailed articles for trivial problems like this.
By the way is any solution available. Faced a lot of embarrassment from the
employer yesterday. What is the fun of having technology which works from
left to right and not from right to left.
Why mercularian does not work on Eclipse  4.1 on push . All open source is
actually closed source
Ahmad Parvez Hakim



On Wed, Sep 21, 2011 at 1:09 PM, Angela Schreiber-2 [via Jackrabbit] <
ml-node+s510166n3829227h72@n4.nabble.com> wrote:

> hi ahmad
>
> > is there some sample code .
>
> not really... but if you read about the details of a PROPFIND
> request it shouldn't be a big deal, should it?
> otherwise you may take a look at spi2dav.RepositoryServiceImpl
> which executes quite some PROPFIND requests that retrieve a
> dedicated set of properties.
>
> hope that helps
> angela
>
> > Waiting anxiously for your reply,
> >
> > regards
> > Parvez Ahmad Hakim
> >
> > On Tue, Sep 20, 2011 at 2:55 PM, Angela Schreiber-2 [via Jackrabbit]<
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=3829227&i=0>>
>  wrote:
> >
> >> hi ahmad
> >>
> >>> 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
> >>>
> >>>    regards
> >>> Ahmad
> >>>
> >>> On Tue, Sep 13, 2011 at 6:10 PM, Julian Reschke<[hidden email]<
> http://user/SendEmail.jtp?type=node&node=3826252&i=0>>wrote:
> >>
> >>>
> >>>> On 2011-09-12 13:27, Parvez Ahmad wrote:
> >>>>
> >>>>> Sir,
> >>>>> My best regards. I am fan of jackrabbit team and make my living
by
> use
> >> of
> >>>>> your invention-- jackrabbit.
> >>>>>
> >>>>> 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 use jackrabit/apache sling. I want to retrieve version labels.
> Please
> >>
> >>>>> help
> >>>>> ...
> >>>>>
> >>>>
> >>>> Please be more specific -- "/// HERE I SEE THE PROBLEM" isn't very
> >> helpful
> >>>> for people trying to understand what you want to do, and what might
be
>
> >> going
> >>>> wrong.
> >>>>
> >>>> Best regards, Julian
> >>>>
> >>
> >>
> >> ------------------------------
> >>   If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> >>
> >>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://jackrabbit.510166.n4.nabble.com/version-creation-using-httpclient-tp3807209p3829227.html
>  To unsubscribe from version creation using httpclient, click here<http://jackrabbit.510166.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3807209&code=cGFydmV6MTJAZ21haWwuY29tfDM4MDcyMDl8LTE4NjQ4MjI2NTY=>.
>
>


--
View this message in context: http://jackrabbit.510166.n4.nabble.com/version-creation-using-httpclient-tp3807209p3855303.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message