You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2002/07/08 10:39:25 UTC

cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation SourceDescriptionGenerator.java

stephan     2002/07/08 01:39:25

  Modified:    src/scratchpad/src/org/apache/cocoon/components/repository/impl
                        SlidePrincipalProvider.java
               src/scratchpad/src/org/apache/cocoon/components/source/impl
                        SlideSource.java
               src/scratchpad/src/org/apache/cocoon/generation
                        SourceDescriptionGenerator.java
  Log:
  Forget the to rename the class UserSourcePermission.
  
  Revision  Changes    Path
  1.3       +21 -1     xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlidePrincipalProvider.java
  
  Index: SlidePrincipalProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlidePrincipalProvider.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SlidePrincipalProvider.java	5 Jul 2002 13:37:36 -0000	1.2
  +++ SlidePrincipalProvider.java	8 Jul 2002 08:39:25 -0000	1.3
  @@ -270,6 +270,16 @@
       }
   
       /**
  +     * Remove a given principal.
  +     *
  +     * @param caller The principal, which should do the operation.
  +     * @param principal The Principal, which should be removed.
  +     */
  +    public void removePrincipal(Principal caller, Principal principal)
  +        throws ProcessingException {
  +    }
  +
  +    /**
        * Return all groups.
        *
        * @param caller The principal, which should do the operation.
  @@ -317,6 +327,16 @@
        * @param group The group, which shoud be add/modified.
        */
       public void addPrincipalGroup(Principal caller, PrincipalGroup group) throws ProcessingException {
  +    }
  +
  +    /**
  +     * Remove a given group.
  +     *
  +     * @param caller The principal, which should do the operation.
  +     * @param group The group, which shoud be removed.
  +     */
  +    public void removePrincipalGroup(Principal caller, PrincipalGroup group)
  +        throws ProcessingException {
       }
   
       /**
  
  
  
  1.10      +9 -9      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/SlideSource.java
  
  Index: SlideSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/SlideSource.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SlideSource.java	2 Jul 2002 16:54:25 -0000	1.9
  +++ SlideSource.java	8 Jul 2002 08:39:25 -0000	1.10
  @@ -78,7 +78,7 @@
   import org.apache.cocoon.components.source.helpers.SourceLock;
   import org.apache.cocoon.components.source.helpers.SourcePermission;
   import org.apache.cocoon.components.source.helpers.SourceProperty;
  -import org.apache.cocoon.components.source.helpers.UserSourcePermission;
  +import org.apache.cocoon.components.source.helpers.PrincipalSourcePermission;
   
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  @@ -675,8 +675,8 @@
           NamespaceConfig config = this.nat.getNamespaceConfig();
   
           String subject = null;
  -        if (sourcepermission instanceof UserSourcePermission) {
  -            subject = config.getUsersPath()+((UserSourcePermission)sourcepermission).getPrincipal();
  +        if (sourcepermission instanceof PrincipalSourcePermission) {
  +            subject = config.getUsersPath()+((PrincipalSourcePermission)sourcepermission).getPrincipal();
   
               // Test if user exists
               try {
  @@ -942,22 +942,22 @@
                           SourcePermission sourcepermission = null;
   
                           if (principal.equals("~"))
  -                            sourcepermission = new UserSourcePermission(UserSourcePermission.PRINCIPAL_SELF, null,
  +                            sourcepermission = new PrincipalSourcePermission(PrincipalSourcePermission.PRINCIPAL_SELF, null,
                                                                           inheritedPermissions, negative);
                           else if (principal.equals("nobody")) 
  -                            sourcepermission = new UserSourcePermission(UserSourcePermission.PRINCIPAL_GUEST, null,
  +                            sourcepermission = new PrincipalSourcePermission(PrincipalSourcePermission.PRINCIPAL_GUEST, null,
                                                                           inheritedPermissions, negative);
                           else if (principal.equals(userspath))
  -                            sourcepermission = new UserSourcePermission(UserSourcePermission.PRINCIPAL_ALL, null,
  +                            sourcepermission = new PrincipalSourcePermission(PrincipalSourcePermission.PRINCIPAL_ALL, null,
                                                                           inheritedPermissions, negative);
                           else if (principal.startsWith(userspath+"/"))
  -                            sourcepermission = new UserSourcePermission(principal.substring(userspath.length()+1), null,
  +                            sourcepermission = new PrincipalSourcePermission(principal.substring(userspath.length()+1), null,
                                                                           inheritedPermissions, negative);
                           else if (principal.startsWith("+"+userspath+"/"))
                               sourcepermission = new GroupSourcePermission(principal.substring(userspath.length()+2), null,
                                                                            inheritedPermissions, negative);
                           else
  -                            sourcepermission = new UserSourcePermission(principal, null,
  +                            sourcepermission = new PrincipalSourcePermission(principal, null,
                                                                           inheritedPermissions, negative);
   
                           if (isAll) {
  
  
  
  1.8       +4 -4      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/SourceDescriptionGenerator.java
  
  Index: SourceDescriptionGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/SourceDescriptionGenerator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SourceDescriptionGenerator.java	2 Jul 2002 16:54:25 -0000	1.7
  +++ SourceDescriptionGenerator.java	8 Jul 2002 08:39:25 -0000	1.8
  @@ -77,7 +77,7 @@
   import org.apache.cocoon.components.source.helpers.SourceLock;
   import org.apache.cocoon.components.source.helpers.SourcePermission;
   import org.apache.cocoon.components.source.helpers.SourceProperty;
  -import org.apache.cocoon.components.source.helpers.UserSourcePermission;
  +import org.apache.cocoon.components.source.helpers.PrincipalSourcePermission;
   //import org.apache.cocoon.environment.Source;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.xml.EmbeddedXMLPipe;
  @@ -407,9 +407,9 @@
   
                   AttributesImpl attributes = new AttributesImpl();
   
  -                if (permissions[i] instanceof UserSourcePermission)
  +                if (permissions[i] instanceof PrincipalSourcePermission)
                       attributes.addAttribute("", PRINCIPAL_ATTR_NAME, PRINCIPAL_ATTR_NAME, "CDATA",
  -                                            ((UserSourcePermission)permissions[i]).getPrincipal());
  +                                            ((PrincipalSourcePermission)permissions[i]).getPrincipal());
                   else if (permissions[i] instanceof GroupSourcePermission)
                       attributes.addAttribute("", GROUP_ATTR_NAME, GROUP_ATTR_NAME, "CDATA",
                                               ((GroupSourcePermission)permissions[i]).getGroup());
  
  
  

----------------------------------------------------------------------
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