You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Naresh Sikha <na...@gmail.com> on 2004/08/01 18:53:33 UTC

Read Only Configurations

I would like to state that my configurations are "read only" so that
they cannot be modified by just anyone who can find it in the
Registry.

Is this possible?

My current workaround is to have an object that all my configuration
beans extend from that have a readOnly property and an assertion
method that fails if the readOnly flag is set. Then any property
setter first asserts that it is not readOnly. Finally my service that
exposes these configurations first sets any top level readOnly flags
before returning them.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Read Only Configurations

Posted by Naresh Sikha <na...@gmail.com>.
Following on that brainstorm - something like "public", "protected"
(for submodules), "private" for both read and write operations?

On Sun, 1 Aug 2004 13:33:07 -0400, Howard Lewis Ship <hl...@gmail.com> wrote:
> Interesting thought; I think what I really want to add is artifact
> visibility, so that your configuratoin would only be accessible from
> within your module (for both read and write).
> 
> 
> 
> On Sun, 1 Aug 2004 09:53:33 -0700, Naresh Sikha <na...@gmail.com> wrote:
> > I would like to state that my configurations are "read only" so that
> > they cannot be modified by just anyone who can find it in the
> > Registry.
> >
> > Is this possible?
> >
> > My current workaround is to have an object that all my configuration
> > beans extend from that have a readOnly property and an assertion
> > method that fails if the readOnly flag is set. Then any property
> > setter first asserts that it is not readOnly. Finally my service that
> > exposes these configurations first sets any top level readOnly flags
> > before returning them.
> >
> > Thanks.
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Read Only Configurations

Posted by Naresh Sikha <na...@gmail.com>.
+1. I think it should be noted that without visibility, then a Service
could be written by the client to get access to a non public
configuration which would be a bad design pattern to promote.

On Mon, 2 Aug 2004 07:50:51 -0400, Howard Lewis Ship <hl...@gmail.com> wrote:
> I took it out, and people demanded it go back in!
> 
> I tihnk schemas, service-points and configuration-points will have a
> visibililty attribute, and the methods on Registry will only be able
> to access public artifacts (which will be the default).
> 
> On Mon, 2 Aug 2004 05:11:31 -0400, James Carman
> 
> 
> <ja...@carmanconsulting.com> wrote:
> > This one reason why the getConfiguration() method should be taken out of the
> > Registry interface (IMHO).
> >
> >
> >
> > -----Original Message-----
> > From: Howard Lewis Ship [mailto:hlship@gmail.com]
> > Sent: Sunday, August 01, 2004 1:33 PM
> > To: hivemind-user@jakarta.apache.org
> > Subject: Re: Read Only Configurations
> >
> > Interesting thought; I think what I really want to add is artifact
> > visibility, so that your configuratoin would only be accessible from
> > within your module (for both read and write).
> >
> > On Sun, 1 Aug 2004 09:53:33 -0700, Naresh Sikha <na...@gmail.com>
> > wrote:
> > > I would like to state that my configurations are "read only" so that
> > > they cannot be modified by just anyone who can find it in the
> > > Registry.
> > >
> > > Is this possible?
> > >
> > > My current workaround is to have an object that all my configuration
> > > beans extend from that have a readOnly property and an assertion
> > > method that fails if the readOnly flag is set. Then any property
> > > setter first asserts that it is not readOnly. Finally my service that
> > > exposes these configurations first sets any top level readOnly flags
> > > before returning them.
> > >
> > > Thanks.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> > >
> > >
> >
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> > http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Read Only Configurations

Posted by Howard Lewis Ship <hl...@gmail.com>.
I took it out, and people demanded it go back in!

I tihnk schemas, service-points and configuration-points will have a
visibililty attribute, and the methods on Registry will only be able
to access public artifacts (which will be the default).

On Mon, 2 Aug 2004 05:11:31 -0400, James Carman
<ja...@carmanconsulting.com> wrote:
> This one reason why the getConfiguration() method should be taken out of the
> Registry interface (IMHO).
> 
> 
> 
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Sunday, August 01, 2004 1:33 PM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Read Only Configurations
> 
> Interesting thought; I think what I really want to add is artifact
> visibility, so that your configuratoin would only be accessible from
> within your module (for both read and write).
> 
> On Sun, 1 Aug 2004 09:53:33 -0700, Naresh Sikha <na...@gmail.com>
> wrote:
> > I would like to state that my configurations are "read only" so that
> > they cannot be modified by just anyone who can find it in the
> > Registry.
> >
> > Is this possible?
> >
> > My current workaround is to have an object that all my configuration
> > beans extend from that have a readOnly property and an assertion
> > method that fails if the readOnly flag is set. Then any property
> > setter first asserts that it is not readOnly. Finally my service that
> > exposes these configurations first sets any top level readOnly flags
> > before returning them.
> >
> > Thanks.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


RE: Read Only Configurations

Posted by James Carman <ja...@carmanconsulting.com>.
This one reason why the getConfiguration() method should be taken out of the
Registry interface (IMHO).  

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Sunday, August 01, 2004 1:33 PM
To: hivemind-user@jakarta.apache.org
Subject: Re: Read Only Configurations

Interesting thought; I think what I really want to add is artifact
visibility, so that your configuratoin would only be accessible from
within your module (for both read and write).

On Sun, 1 Aug 2004 09:53:33 -0700, Naresh Sikha <na...@gmail.com>
wrote:
> I would like to state that my configurations are "read only" so that
> they cannot be modified by just anyone who can find it in the
> Registry.
> 
> Is this possible?
> 
> My current workaround is to have an object that all my configuration
> beans extend from that have a readOnly property and an assertion
> method that fails if the readOnly flag is set. Then any property
> setter first asserts that it is not readOnly. Finally my service that
> exposes these configurations first sets any top level readOnly flags
> before returning them.
> 
> Thanks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Read Only Configurations

Posted by Howard Lewis Ship <hl...@gmail.com>.
Interesting thought; I think what I really want to add is artifact
visibility, so that your configuratoin would only be accessible from
within your module (for both read and write).

On Sun, 1 Aug 2004 09:53:33 -0700, Naresh Sikha <na...@gmail.com> wrote:
> I would like to state that my configurations are "read only" so that
> they cannot be modified by just anyone who can find it in the
> Registry.
> 
> Is this possible?
> 
> My current workaround is to have an object that all my configuration
> beans extend from that have a readOnly property and an assertion
> method that fails if the readOnly flag is set. Then any property
> setter first asserts that it is not readOnly. Finally my service that
> exposes these configurations first sets any top level readOnly flags
> before returning them.
> 
> Thanks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org