avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject cvs commit: avalon/merlin/platform/tutorials/security/location/impl/conf block.xml
Date Mon, 01 Mar 2004 23:08:59 GMT
niclas      2004/03/01 15:08:59

  Added:       merlin/platform/tutorials/security/location/api/src/java/tutorial/location
                        LocationPermission.java LocationService.java
               merlin/platform/tutorials/security/location/impl maven.xml
               merlin/platform/tutorials/security/location/impl/conf
                        block.xml
  Log:
  Beginning of a Tutorial to show the power of code security in Merlin. More work is needed
though.
  
  Revision  Changes    Path
  1.1                  avalon/merlin/platform/tutorials/security/location/api/src/java/tutorial/location/LocationPermission.java
  
  Index: LocationPermission.java
  ===================================================================
  /* 
   * Copyright 2004 Apache Software Foundation
   * Licensed  under the  Apache License,  Version 2.0  (the "License");
   * you may not use  this file  except in  compliance with the License.
   * You may obtain a copy of the License at 
   * 
   *   http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed  under the  License is distributed on an "AS IS" BASIS,
   * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
   * implied.
   * 
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package tutorial.location;
  
  import java.util.PropertyPermission;
  
  /**
   * The LocationPermission checks if the caller has access to the
   * location it is requesting.
   *
   * Locations has a dot-notation, such as Europe.Spain.Madrid, and
   * if the caller is requesting Europe.Spain.Madrid, it will need
   * to be granted access to Europe, Europe.Spain or Europe.Spain.Madrid.
   */
  public class LocationPermission extends PropertyPermission 
  {
  
      public LocationPermission( String location )
      {
          super( location );
      }
  }
  
  
  1.1                  avalon/merlin/platform/tutorials/security/location/api/src/java/tutorial/location/LocationService.java
  
  Index: LocationService.java
  ===================================================================
  /* 
   * Copyright 2004 Apache Software Foundation
   * Licensed  under the  Apache License,  Version 2.0  (the "License");
   * you may not use  this file  except in  compliance with the License.
   * You may obtain a copy of the License at 
   * 
   *   http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed  under the  License is distributed on an "AS IS" BASIS,
   * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
   * implied.
   * 
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package tutorial.location;
  
  /**
   * LocationService from Merlin's Composition Tutorial
   *
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   */
  public interface LocationService
  {
     /**
      * Return a location.
      * @return a location
      */
      public String getLocation();
  }
  
  
  
  
  1.1                  avalon/merlin/platform/tutorials/security/location/impl/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="jar:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <preGoal name="demo">
      <attainGoal name="jar:install"/>
    </preGoal>
  
  </project>
  
  
  1.1                  avalon/merlin/platform/tutorials/security/location/impl/conf/block.xml
  
  Index: block.xml
  ===================================================================
  
  <container name="locator">
  
     <services>
       <service type="tutorial.location.LocationService">
         <source>info</source>
       </service>
     </services>
  
     <classloader>
       <classpath>
         <repository>
           <resource id="avalon-framework:avalon-framework-api" version="4.1.5"/>
           <resource id="avalon-framework:avalon-framework-impl" version="4.1.5"/>
           <resource id="merlin-tutorial:locator-api" version="1.0"/>
           <resource id="merlin-tutorial:locator-impl" version="1.0"/>
         </repository>
       </classpath>
     </classloader>
  
     <component name="info" 
         class="tutorial.location.LocationComponent">
         <configuration>
           <source>Paris</source>
         </configuration>
     </component>
  
  </container>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message