You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gi...@apache.org on 2001/10/26 13:29:52 UTC

cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xscript XScriptManager.java

giacomo     01/10/26 04:29:52

  Modified:    src/org/apache/cocoon/components/xscript XScriptManager.java
  Log:
  fixed redundant modifiers
  
  Revision  Changes    Path
  1.2       +16 -16    xml-cocoon2/src/org/apache/cocoon/components/xscript/XScriptManager.java
  
  Index: XScriptManager.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/xscript/XScriptManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XScriptManager.java	2001/10/10 20:53:56	1.1
  +++ XScriptManager.java	2001/10/26 11:29:52	1.2
  @@ -19,15 +19,15 @@
    */
   public interface XScriptManager
   {
  -  public final String ROLE = "org.apache.cocoon.components.xscript.XScriptManager";
  +  String ROLE = "org.apache.cocoon.components.xscript.XScriptManager";
   
  -  public final String XSCRIPT_NS = "http://apache.org/xsp/xscript/1.0";
  +  String XSCRIPT_NS = "http://apache.org/xsp/xscript/1.0";
   
     /**
      * The variable's global scope. Each Cocoon instance has exactly one
      * global scope for variables.
      */
  -  public final int GLOBAL_SCOPE = 1;
  +  int GLOBAL_SCOPE = 1;
     /**
      * The session scope. This scope is specific to a particular
      * activation of an XSP page, which is usually identified by the
  @@ -35,8 +35,8 @@
      * point of view however, the session identifier is not interpreted
      * in any way, so a client can define its own notion of "session".
      */
  -  public final int SESSION_SCOPE = 2;
  -  
  +  int SESSION_SCOPE = 2;
  +
     /**
      * The page scope. This is scope very specific to an XSP page, and
      * defines variables visible only within the context of that
  @@ -45,7 +45,7 @@
      * variables. This identifier is not necessarily the URL or full
      * path of that page; it is up to the page to define it.
      */
  -  public final int PAGE_SCOPE = 3;
  +  int PAGE_SCOPE = 3;
   
     /**
      * Search for a variable in all the accessible scopes. The variable
  @@ -53,7 +53,7 @@
      * found here, the current page scope is searched next. If nothing
      * is found either, the global scope is searched.
      */
  -  public final int ALL_SCOPES = 4;
  +  int ALL_SCOPES = 4;
   
     /**
      * Obtains the object value of the
  @@ -83,7 +83,7 @@
      * depends on <code>scope</code>
      * @return a <code>{@link XScriptObject}</code> value
      */
  -  public XScriptObject get(String name, int scope, String context)
  +  XScriptObject get(String name, int scope, String context)
       throws IllegalArgumentException;
   
     /**
  @@ -106,11 +106,11 @@
      * @return a <code>XScriptObject</code> value
      * @exception IllegalArgumentException if an error occurs
      */
  -  public XScriptObject getFirst(String name,
  +  XScriptObject getFirst(String name,
                                   String sessionContext,
                                   String pageContext)
       throws IllegalArgumentException;
  -  
  +
     /**
      * Defines or overwrites the value of variable
      * <code>name</code> in <code>scope</code>. The <code>context</code>
  @@ -123,7 +123,7 @@
      * @param context a <code>String</code> value whose interpretation
      * depends on <code>scope</code>
      */
  -  public void put(String name, XScriptObject value, int scope, String context)
  +  void put(String name, XScriptObject value, int scope, String context)
       throws IllegalArgumentException;
   
     /**
  @@ -136,8 +136,8 @@
      * @param scope an <code>int</code> value
      * @param context a <code>String</code> value
      */
  -  public void remove(String name, int scope, String context);
  -  
  +  void remove(String name, int scope, String context);
  +
     /**
      * Remove the first appearance of <code>name</code> in the all the
      * currently accessible scopes. The search happens as described in
  @@ -148,13 +148,13 @@
      * @param pageContext a <code>String</code> value
      * @exception IllegalArgumentException if an error occurs
      */
  -  public void removeFirst(String name, String sessionContext, String pageContext)
  +  void removeFirst(String name, String sessionContext, String pageContext)
       throws IllegalArgumentException;
  -  
  +
     /**
      * Return the <code>ComponentManager</code> managing this instance.
      *
      * @return a <code>ComponentManager</code> value
      */
  -  public ComponentManager getComponentManager();
  +  ComponentManager getComponentManager();
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Re: cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xscript XScriptManager.java

Posted by Stefano Mazzocchi <st...@apache.org>.
Berin Loritsch wrote:

> UNDER NO CIRCUMSTANCES should the ComponentManager be openly available
> to all code in the world.  The Components that receive the ComponentManager
> must be carefully managed.

+1

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xscript XScriptManager.java

Posted by giacomo <gi...@apache.org>.
On Fri, 26 Oct 2001, Berin Loritsch wrote:

> >      /**
> >       * Return the <code>ComponentManager</code> managing this instance.
> >       *
> >       * @return a <code>ComponentManager</code> value
> >       */
> >   -  public ComponentManager getComponentManager();
> >   +  ComponentManager getComponentManager();
>
>
> This part of the API just caught my eye.  Can anyone tell me what purpose
> this serves?  I am against this approach as it violates the IoC that we
> have so carefully crafted into Cocoon.  If you need a ComponentManager,
> implement Composable!  The parent component will/should give it to you.
>
> Basically what I am saying is this:
>
> UNDER NO CIRCUMSTANCES should the ComponentManager be openly available
> to all code in the world.  The Components that receive the ComponentManager
> must be carefully managed.
>
> We should probably change this soon.

I stronly support Berins oppinion on this. Ovidiu, can you explain this
methods usage intention?

Giacomo


----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Re: cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xscript XScriptManager.java

Posted by giacomo <gi...@apache.org>.
On Fri, 26 Oct 2001, Berin Loritsch wrote:

> >      /**
> >       * Return the <code>ComponentManager</code> managing this instance.
> >       *
> >       * @return a <code>ComponentManager</code> value
> >       */
> >   -  public ComponentManager getComponentManager();
> >   +  ComponentManager getComponentManager();
>
>
> This part of the API just caught my eye.  Can anyone tell me what purpose
> this serves?  I am against this approach as it violates the IoC that we
> have so carefully crafted into Cocoon.  If you need a ComponentManager,
> implement Composable!  The parent component will/should give it to you.
>
> Basically what I am saying is this:
>
> UNDER NO CIRCUMSTANCES should the ComponentManager be openly available
> to all code in the world.  The Components that receive the ComponentManager
> must be carefully managed.
>
> We should probably change this soon.

I stronly support Berins oppinion on this. Ovidiu, can you explain this
methods usage intention?

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xscript XScriptManager.java

Posted by Berin Loritsch <bl...@apache.org>.
>      /**
>       * Return the <code>ComponentManager</code> managing this instance.
>       *
>       * @return a <code>ComponentManager</code> value
>       */
>   -  public ComponentManager getComponentManager();
>   +  ComponentManager getComponentManager();


This part of the API just caught my eye.  Can anyone tell me what purpose
this serves?  I am against this approach as it violates the IoC that we
have so carefully crafted into Cocoon.  If you need a ComponentManager,
implement Composable!  The parent component will/should give it to you.

Basically what I am saying is this:

UNDER NO CIRCUMSTANCES should the ComponentManager be openly available
to all code in the world.  The Components that receive the ComponentManager
must be carefully managed.

We should probably change this soon.

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Re: cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xscript XScriptManager.java

Posted by Berin Loritsch <bl...@apache.org>.
>      /**
>       * Return the <code>ComponentManager</code> managing this instance.
>       *
>       * @return a <code>ComponentManager</code> value
>       */
>   -  public ComponentManager getComponentManager();
>   +  ComponentManager getComponentManager();


This part of the API just caught my eye.  Can anyone tell me what purpose
this serves?  I am against this approach as it violates the IoC that we
have so carefully crafted into Cocoon.  If you need a ComponentManager,
implement Composable!  The parent component will/should give it to you.

Basically what I am saying is this:

UNDER NO CIRCUMSTANCES should the ComponentManager be openly available
to all code in the world.  The Components that receive the ComponentManager
must be carefully managed.

We should probably change this soon.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org