You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Peter Morton <Pe...@gtnet.com> on 2005/06/02 14:32:09 UTC
Modifying checking in properties.
Hello,
I would like to set the value of a property of a node that is checked-in,
without having to check the node out. (ie so that it is only exists in the
workspace and not under version control)
I have set the property OnParentVersionAction.IGNORE for onParentVersion.
but the code fails due to the following check:
// verify that parent node is checked-out
if (!parent.internalIsCheckedOut()) {
throw new VersionException("cannot set the value of a property
of a checked-in node "
+ safeGetJCRPath());
}
Should I be doing this a different way?
Peter.
________________________________________________________________________________
This email (and any attachments) is private and confidential, and is intended
solely for the addressee. If you have received this communication in error
please remove it and inform us via telephone or email.
Although we take all possible steps to ensure mail and attachments are free
from malicious content, malware and viruses, we cannot accept any responsibility
whatsoever for any changes to content outwith our administrative bounds.
The views represented within this mail are solely the view of the
author and do not reflect the views of Graham Technology as a whole.
________________________________________________________________________________
Graham Technology plc http://www.gtnet.com
________________________________________________________________________________
Re: Modifying checking in properties.
Posted by David Nuescheler <da...@gmail.com>.
hi peter,
i think you are right. i will file an issue in jsr-283 to make sure
that we don't
forget to fix this.
i think it would basically boil down to something like:
---
The node N and its connected subtree become read-only, with the exception
of properties and child-nodes that are set to OPV=VERSION or OPV=IGNORE.
---
is that correct?
regards,
david
On 6/2/05, Peter Morton <Pe...@gtnet.com> wrote:
> Not really, i read this section of the spec and it does not really do what I
> would like it to do.
>
> I would like properties that have OnParentVersionAction.IGNORE set on them
> to be read-write within my workspace regardless of the check-in status.
>
> Peter.
>
> > -----Original Message-----
> > From: Angela Schreiber [mailto:anchela@day.com]
> > Sent: 02 June 2005 13:45
> > To: jackrabbit-dev@incubator.apache.org
> > Subject: Re: Modifying checking in properties.
> >
> >
> > hi
> >
> > you cannot set a property of a checked-in node.
> > see jsr170 specification section 8.2.5 Check In:
> >
> > "The node N and its connected non-versionable subtree become read-only.
> > [...]
> > Read-only status means that an item cannot be altered by the client
> > using standard API methods (addNode, setProperty, etc.). The only
> > exceptions to this rule are the restore , Node.merge and Node.update
> > operations; [...]".
> >
> > and section 8.2.6 Check Out:
> >
> > "In order to alter a versionable node (and its non-versionable subtree)
> > the node must be checked-out."
> >
> > is that, what you were looking for?
> > kind regards
> >
> > Peter Morton wrote:
> > > Hello,
> > >
> > > I would like to set the value of a property of a node that is
> > checked-in,
> > > without having to check the node out. (ie so that it is only
> > exists in the
> > > workspace and not under version control)
> > >
> > > I have set the property OnParentVersionAction.IGNORE for
> > onParentVersion.
> > > but the code fails due to the following check:
> > >
> > > // verify that parent node is checked-out
> > > if (!parent.internalIsCheckedOut()) {
> > > throw new VersionException("cannot set the value of
> > a property
> > > of a checked-in node "
> > > + safeGetJCRPath());
> > > }
> > >
> > > Should I be doing this a different way?
> > >
> > > Peter.
> > >
> > >
> > >
> > __________________________________________________________________
> > ______________
> > > This email (and any attachments) is private and confidential,
> > and is intended
> > > solely for the addressee. If you have received this
> > communication in error
> > > please remove it and inform us via telephone or email.
> > >
> > > Although we take all possible steps to ensure mail and
> > attachments are free
> > > from malicious content, malware and viruses, we cannot accept
> > any responsibility
> > > whatsoever for any changes to content outwith our administrative bounds.
> > >
> > > The views represented within this mail are solely the view of the
> > > author and do not reflect the views of Graham Technology as a whole.
> > >
> > __________________________________________________________________
> > ______________
> > >
> > > Graham Technology plc http://www.gtnet.com
> > >
> > __________________________________________________________________
> > ______________
> >
> >
>
>
> ________________________________________________________________________________
> This email (and any attachments) is private and confidential, and is intended
> solely for the addressee. If you have received this communication in error
> please remove it and inform us via telephone or email.
>
> Although we take all possible steps to ensure mail and attachments are free
> from malicious content, malware and viruses, we cannot accept any responsibility
> whatsoever for any changes to content outwith our administrative bounds.
>
> The views represented within this mail are solely the view of the
> author and do not reflect the views of Graham Technology as a whole.
> ________________________________________________________________________________
>
> Graham Technology plc http://www.gtnet.com
> ________________________________________________________________________________
>
Re: Modifying checking in properties.
Posted by Stefan Guggisberg <st...@gmail.com>.
On 2/6/07, Sebastian Redl <wa...@gmx.net> wrote:
> Tobias Strasser <tobias.strasser <at> gmail.com> writes:
>
> >
> > well, i see your point, but this is how the spec defines it. all
> > properties of a checked-in node, regardless if OPV=Ignore or not, are
> > read-only. but i agree, that it could be usefull to allow altering of
> > OPV=Ignored properties.
> >
>
> Does anyone know if this will change in the next JCR spec? IMO this is a stupid
> and misguided restriction
feel free to send your feedback to the jsr 283 expert group:
https://jsr-283.dev.java.net/
cheers
stefan
> - something that is explicitly marked as non-versioned
> shouldn't underly the restrictions of versioning just because somewhere it has a
> versionable ancestor.
>
>
Re: Modifying checking in properties.
Posted by Sebastian Redl <wa...@gmx.net>.
Tobias Strasser <tobias.strasser <at> gmail.com> writes:
>
> well, i see your point, but this is how the spec defines it. all
> properties of a checked-in node, regardless if OPV=Ignore or not, are
> read-only. but i agree, that it could be usefull to allow altering of
> OPV=Ignored properties.
>
Does anyone know if this will change in the next JCR spec? IMO this is a stupid
and misguided restriction - something that is explicitly marked as non-versioned
shouldn't underly the restrictions of versioning just because somewhere it has a
versionable ancestor.
Re: Modifying checking in properties.
Posted by Tobias Strasser <to...@gmail.com>.
well, i see your point, but this is how the spec defines it. all
properties of a checked-in node, regardless if OPV=Ignore or not, are
read-only. but i agree, that it could be usefull to allow altering of
OPV=Ignored properties.
cheers, tobi
On 6/2/05, Peter Morton <Pe...@gtnet.com> wrote:
> Not really, i read this section of the spec and it does not really do what I
> would like it to do.
>
> I would like properties that have OnParentVersionAction.IGNORE set on them
> to be read-write within my workspace regardless of the check-in status.
>
> Peter.
>
> > -----Original Message-----
> > From: Angela Schreiber [mailto:anchela@day.com]
> > Sent: 02 June 2005 13:45
> > To: jackrabbit-dev@incubator.apache.org
> > Subject: Re: Modifying checking in properties.
> >
> >
> > hi
> >
> > you cannot set a property of a checked-in node.
> > see jsr170 specification section 8.2.5 Check In:
> >
> > "The node N and its connected non-versionable subtree become read-only.
> > [...]
> > Read-only status means that an item cannot be altered by the client
> > using standard API methods (addNode, setProperty, etc.). The only
> > exceptions to this rule are the restore , Node.merge and Node.update
> > operations; [...]".
> >
> > and section 8.2.6 Check Out:
> >
> > "In order to alter a versionable node (and its non-versionable subtree)
> > the node must be checked-out."
> >
> > is that, what you were looking for?
> > kind regards
> >
> > Peter Morton wrote:
> > > Hello,
> > >
> > > I would like to set the value of a property of a node that is
> > checked-in,
> > > without having to check the node out. (ie so that it is only
> > exists in the
> > > workspace and not under version control)
> > >
> > > I have set the property OnParentVersionAction.IGNORE for
> > onParentVersion.
> > > but the code fails due to the following check:
> > >
> > > // verify that parent node is checked-out
> > > if (!parent.internalIsCheckedOut()) {
> > > throw new VersionException("cannot set the value of
> > a property
> > > of a checked-in node "
> > > + safeGetJCRPath());
> > > }
> > >
> > > Should I be doing this a different way?
> > >
> > > Peter.
> > >
> > >
> > >
> > __________________________________________________________________
> > ______________
> > > This email (and any attachments) is private and confidential,
> > and is intended
> > > solely for the addressee. If you have received this
> > communication in error
> > > please remove it and inform us via telephone or email.
> > >
> > > Although we take all possible steps to ensure mail and
> > attachments are free
> > > from malicious content, malware and viruses, we cannot accept
> > any responsibility
> > > whatsoever for any changes to content outwith our administrative bounds.
> > >
> > > The views represented within this mail are solely the view of the
> > > author and do not reflect the views of Graham Technology as a whole.
> > >
> > __________________________________________________________________
> > ______________
> > >
> > > Graham Technology plc http://www.gtnet.com
> > >
> > __________________________________________________________________
> > ______________
> >
> >
>
>
> ________________________________________________________________________________
> This email (and any attachments) is private and confidential, and is intended
> solely for the addressee. If you have received this communication in error
> please remove it and inform us via telephone or email.
>
> Although we take all possible steps to ensure mail and attachments are free
> from malicious content, malware and viruses, we cannot accept any responsibility
> whatsoever for any changes to content outwith our administrative bounds.
>
> The views represented within this mail are solely the view of the
> author and do not reflect the views of Graham Technology as a whole.
> ________________________________________________________________________________
>
> Graham Technology plc http://www.gtnet.com
> ________________________________________________________________________________
>
--
------------------------------------------< tobias.strasser@day.com >---
Tobias Strasser, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---
RE: Modifying checking in properties.
Posted by Peter Morton <Pe...@gtnet.com>.
Not really, i read this section of the spec and it does not really do what I
would like it to do.
I would like properties that have OnParentVersionAction.IGNORE set on them
to be read-write within my workspace regardless of the check-in status.
Peter.
> -----Original Message-----
> From: Angela Schreiber [mailto:anchela@day.com]
> Sent: 02 June 2005 13:45
> To: jackrabbit-dev@incubator.apache.org
> Subject: Re: Modifying checking in properties.
>
>
> hi
>
> you cannot set a property of a checked-in node.
> see jsr170 specification section 8.2.5 Check In:
>
> "The node N and its connected non-versionable subtree become read-only.
> [...]
> Read-only status means that an item cannot be altered by the client
> using standard API methods (addNode, setProperty, etc.). The only
> exceptions to this rule are the restore , Node.merge and Node.update
> operations; [...]".
>
> and section 8.2.6 Check Out:
>
> "In order to alter a versionable node (and its non-versionable subtree)
> the node must be checked-out."
>
> is that, what you were looking for?
> kind regards
>
> Peter Morton wrote:
> > Hello,
> >
> > I would like to set the value of a property of a node that is
> checked-in,
> > without having to check the node out. (ie so that it is only
> exists in the
> > workspace and not under version control)
> >
> > I have set the property OnParentVersionAction.IGNORE for
> onParentVersion.
> > but the code fails due to the following check:
> >
> > // verify that parent node is checked-out
> > if (!parent.internalIsCheckedOut()) {
> > throw new VersionException("cannot set the value of
> a property
> > of a checked-in node "
> > + safeGetJCRPath());
> > }
> >
> > Should I be doing this a different way?
> >
> > Peter.
> >
> >
> >
> __________________________________________________________________
> ______________
> > This email (and any attachments) is private and confidential,
> and is intended
> > solely for the addressee. If you have received this
> communication in error
> > please remove it and inform us via telephone or email.
> >
> > Although we take all possible steps to ensure mail and
> attachments are free
> > from malicious content, malware and viruses, we cannot accept
> any responsibility
> > whatsoever for any changes to content outwith our administrative bounds.
> >
> > The views represented within this mail are solely the view of the
> > author and do not reflect the views of Graham Technology as a whole.
> >
> __________________________________________________________________
> ______________
> >
> > Graham Technology plc http://www.gtnet.com
> >
> __________________________________________________________________
> ______________
>
>
________________________________________________________________________________
This email (and any attachments) is private and confidential, and is intended
solely for the addressee. If you have received this communication in error
please remove it and inform us via telephone or email.
Although we take all possible steps to ensure mail and attachments are free
from malicious content, malware and viruses, we cannot accept any responsibility
whatsoever for any changes to content outwith our administrative bounds.
The views represented within this mail are solely the view of the
author and do not reflect the views of Graham Technology as a whole.
________________________________________________________________________________
Graham Technology plc http://www.gtnet.com
________________________________________________________________________________
Re: Modifying checking in properties.
Posted by Angela Schreiber <an...@day.com>.
hi
you cannot set a property of a checked-in node.
see jsr170 specification section 8.2.5 Check In:
"The node N and its connected non-versionable subtree become read-only.
[...]
Read-only status means that an item cannot be altered by the client
using standard API methods (addNode, setProperty, etc.). The only
exceptions to this rule are the restore , Node.merge and Node.update
operations; [...]".
and section 8.2.6 Check Out:
"In order to alter a versionable node (and its non-versionable subtree)
the node must be checked-out."
is that, what you were looking for?
kind regards
Peter Morton wrote:
> Hello,
>
> I would like to set the value of a property of a node that is checked-in,
> without having to check the node out. (ie so that it is only exists in the
> workspace and not under version control)
>
> I have set the property OnParentVersionAction.IGNORE for onParentVersion.
> but the code fails due to the following check:
>
> // verify that parent node is checked-out
> if (!parent.internalIsCheckedOut()) {
> throw new VersionException("cannot set the value of a property
> of a checked-in node "
> + safeGetJCRPath());
> }
>
> Should I be doing this a different way?
>
> Peter.
>
>
> ________________________________________________________________________________
> This email (and any attachments) is private and confidential, and is intended
> solely for the addressee. If you have received this communication in error
> please remove it and inform us via telephone or email.
>
> Although we take all possible steps to ensure mail and attachments are free
> from malicious content, malware and viruses, we cannot accept any responsibility
> whatsoever for any changes to content outwith our administrative bounds.
>
> The views represented within this mail are solely the view of the
> author and do not reflect the views of Graham Technology as a whole.
> ________________________________________________________________________________
>
> Graham Technology plc http://www.gtnet.com
> ________________________________________________________________________________