You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2002/03/09 07:40:35 UTC

cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine sunshine-act.xmap sunshine-gen.xmap sunshine-int.xpipe sunshine-tran.xmap sunshine.xpipe sunshine.xconf sunshine.pipeline sunshine.sitemap

vgritsenko    02/03/08 22:40:35

  Modified:    src/scratchpad/src/org/apache/cocoon/sunshine sunshine.xconf
  Added:       src/scratchpad/src/org/apache/cocoon/sunshine
                        sunshine-act.xmap sunshine-gen.xmap
                        sunshine-int.xpipe sunshine-tran.xmap
                        sunshine.xpipe
  Removed:     src/scratchpad/src/org/apache/cocoon/sunshine
                        sunshine.pipeline sunshine.sitemap
  Log:
  rewrite xconf tool
  
  Revision  Changes    Path
  1.2       +20 -14    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine.xconf
  
  Index: sunshine.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine.xconf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sunshine.xconf	18 Feb 2002 13:29:50 -0000	1.1
  +++ sunshine.xconf	9 Mar 2002 06:40:35 -0000	1.2
  @@ -1,14 +1,20 @@
  -<component role="org.apache.cocoon.sunshine.SunShine" 
  -           class="org.apache.cocoon.sunshine.SunShine"/>
  -<component role="org.apache.cocoon.sunshine.sunrise.SunRise" 
  -           class="org.apache.cocoon.sunshine.sunrise.SunRise">
  -			<mediatypes default="html">
  -				<media name="wap" useragent="Nokia"/>
  -				<media name="wap" useragent="UP"/>
  -				<media name="wap" useragent="Wapalizer"/>
  -			</mediatypes>
  -</component>
  -<component role="org.apache.cocoon.sunshine.sunspot.SunSpot" 
  -           class="org.apache.cocoon.sunshine.sunspot.SunSpot"/>
  -<component role="org.apache.cocoon.sunshine.connector.ResourceConnector" 
  -           class="org.apache.cocoon.sunshine.connector.ResourceConnectorImpl"/>
  +<?xml version="1.0"?>
  +
  +<xconf xpath="/cocoon" unless="component[mediatypes/media]">
  +
  +  <!-- ======================= SunShine =========================== -->
  +  <component role="org.apache.cocoon.sunshine.SunShine" 
  +             class="org.apache.cocoon.sunshine.SunShine"/>
  +  <component role="org.apache.cocoon.sunshine.sunrise.SunRise" 
  +             class="org.apache.cocoon.sunshine.sunrise.SunRise">
  +    <mediatypes default="html">
  +      <media name="wap" useragent="Nokia"/>
  +      <media name="wap" useragent="UP"/>
  +      <media name="wap" useragent="Wapalizer"/>
  +    </mediatypes>
  +  </component>
  +  <component role="org.apache.cocoon.sunshine.sunspot.SunSpot" 
  +             class="org.apache.cocoon.sunshine.sunspot.SunSpot"/>
  +  <component role="org.apache.cocoon.sunshine.connector.ResourceConnector" 
  +             class="org.apache.cocoon.sunshine.connector.ResourceConnectorImpl"/>
  +</xconf>
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine-act.xmap
  
  Index: sunshine-act.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <xmap xpath="/sitemap/components/actions"
        unless="action[@name='sunShine-session']">
  
      <!-- ======================= SunShine =========================== -->
      <map:action name="sunShine-session"
                  src="org.apache.cocoon.sunshine.acting.SessionAction"/>
      <map:action name="sunRise-auth"
                  src="org.apache.cocoon.sunshine.sunrise.acting.AuthAction">
          <handlers>
            <handler name="sunspotdemohandler" xmlns:map="http://apache.org/cocoon/sitemap/1.0" xmlns:sunshine="http://sunshine.sundn.de/sunshine/1.0">
  		<redirect-to uri="cocoon://sunspotdemoportal"/>
  		<authentication uri="cocoon:raw://sunspotdemoresource-sunrise-authuser"/>
  		<load-users uri="cocoon:raw://sunspotdemoresource-sunrise-loaduser"/>
  		<load-roles uri="cocoon:raw://sunspotdemoresource-sunrise-roles"/>
  		<new-user uri="cocoon:raw://sunspotdemoresource-sunrise-newuser"/>
  		<new-role uri="cocoon:raw://sunspotdemoresource-sunrise-newrole"/>
  		<change-user uri="cocoon:raw://sunspotdemoresource-sunrise-changeuser"/>
  		<delete-role uri="cocoon:raw://sunspotdemoresource-sunrise-delrole"/>
  		<delete-user uri="cocoon:raw://sunspotdemoresource-sunrise-deluser"/>
  		<applications>
  			<application loadondemand="true" name="sunspotdemo">
  				<configuration name="sunSpot">
  					<auth-redirect>sunspotdemo-portal</auth-redirect>
  					<portal-uri>sunspotdemo-portal</portal-uri>
  					<profile-cache>true</profile-cache>
  					<process-sunlets-parallel>false</process-sunlets-parallel>
  					<default-sunlet-timeout>10000</default-sunlet-timeout> <!-- milliseconds -->
  					<profile>
  						<layout-base uri="sunspotdemo/profiles/layoutprofile.xml"/>
  						<sunlet-base uri="sunspotdemo/profiles/sunletprofile.xml"/>
  						<sunlet-base-save uri="sunspotdemo/profiles/sunletprofile.xml"/>
  						<type-base uri="sunspotdemo/profiles/types.xml"/>
  						<admin-type-base uri="sunspotdemo/profiles/admintypes.xml"/>
  						<global-delta-load uri="sunspotdemo/profiles/globalprofile.xml"/>
  						<global-delta-save uri="cocoon:raw://sunspotdemoresource-saveglobalprofile"/>
  						<role-delta-load uri="cocoon:raw://sunspotdemoresource-roleprofile"/>
  						<role-delta-save uri="cocoon:raw://sunspotdemoresource-saveroleprofile"/>
  						<user-delta-load uri="cocoon:raw://sunspotdemoresource-userprofile"/>
  						<user-delta-save uri="cocoon:raw://sunspotdemoresource-saveuserprofile"/>
  						<user-status-load uri="cocoon:raw://sunspotdemoresource-userstatus"/>
  						<user-status-save uri="cocoon:raw://sunspotdemoresource-saveuserstatus"/>
  					</profile>
  				</configuration>
  			</application>
  		</applications>
  	    </handler>
          </handlers>
      </map:action>
  
      <map:action name="sunRise-login"
                  src="org.apache.cocoon.sunshine.sunrise.acting.LoginAction"/>
      <map:action name="sunRise-logout"
                  src="org.apache.cocoon.sunshine.sunrise.acting.LogoutAction"/>
      <map:action name="sunRise-loggedIn"
                  src="org.apache.cocoon.sunshine.sunrise.acting.LoggedInAction"/>
      <map:action name="sunSpot-auth"
                  src="org.apache.cocoon.sunshine.sunspot.acting.AuthAction"/>
  </xmap>
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine-gen.xmap
  
  Index: sunshine-gen.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <xmap xpath="/sitemap/components/generators"
        unless="generator[@name='sunSpot']">
  
      <!-- ======================= SunShine =========================== -->
      <map:generator name="sunSpot"
                     src="org.apache.cocoon.sunshine.sunspot.generation.PortalGenerator"
                     label="content,data"/>
      <map:generator name="sunSpot-conf"
                     src="org.apache.cocoon.sunshine.sunspot.generation.ConfigurationGenerator"
                     label="content,data"/>
      <map:generator name="sunRise-conf"
                     src="org.apache.cocoon.sunshine.sunrise.generation.ConfigurationGenerator"
                     label="content,data"/>
  </xmap>
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine-int.xpipe
  
  Index: sunshine-int.xpipe
  ===================================================================
  <?xml version="1.0"?>
  
  <xmap xpath="/sitemap/pipelines/pipeline[@id='optional-internal']"
        unless="match[@pattern='sunspotdemoresource-sunrise-*']">
  
      <!-- ======================= SunShine =========================== -->
      <!-- This is the sunSpot Cocoon Demo Portal Pipeline              -->
  	<map:match pattern="sunspotdemoresource-sunrise-*">
  		<!-- authentication -->
  		<map:match pattern="sunspotdemoresource-sunrise-authuser">
  			<map:generate src="sunspotdemo/resources/sunrise-user.xml"/>
  			<map:transform src="sunspotdemo/styles/sunrise-user.xsl">
     				<map:parameter name="use-request-parameters" value="true"/>
                    </map:transform>
  			<map:serialize type="xml"/>
  		</map:match>
  
  		<map:match pattern="sunspotdemoresource-sunrise-changeuser">
  			<map:generate src="sunspotdemo/resources/sunrise-changeuser.xml"/>
  			<map:transform type="sunShine"/>
  			<map:transform src="sunspotdemo/styles/changeuser.xsl"/>
  			<map:transform type="sunShineInsert"/>
  			<map:transform src="sunspotdemo/styles/portal.xsl"/>
  			<map:serialize type="xml"/>
  		</map:match>
  
  		<map:match pattern="sunspotdemoresource-*">
  			<map:generate src="sunspotdemo/resources/{1}.xml"/>
  			<map:transform type="sunShine"/>
  			<map:transform type="sunShineInsert"/>
  			<map:transform src="sunspotdemo/styles/portal.xsl"/>
  			<map:serialize type="xml"/>
  		</map:match>
  	</map:match>
        
  </xmap>
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine-tran.xmap
  
  Index: sunshine-tran.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <xmap xpath="/sitemap/components/transformers"
        unless="transformer[@name='sunShine']">
  
      <!-- ======================= SunShine =========================== -->
      <map:transformer name="sunShine"
                       src="org.apache.cocoon.sunshine.transformation.SunShineTransformer"/>
      <map:transformer name="sunShinePre"
                       src="org.apache.cocoon.sunshine.transformation.SunShinePreTransformer"/>
      <map:transformer name="sunShinePost"
                       src="org.apache.cocoon.sunshine.transformation.SunShinePostTransformer"/>
      <map:transformer name="sunShineInsert"
                       src="org.apache.cocoon.sunshine.transformation.InsertTransformer"/>
  </xmap>
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine.xpipe
  
  Index: sunshine.xpipe
  ===================================================================
  <?xml version="1.0"?>
  
  <xmap xpath="/sitemap/pipelines/pipeline[@id='optional']"
        unless="match[@pattern='sunspotdemoportal']">
  
      <!-- ======================= SunShine =========================== -->
      <!-- This is the sunSpot Cocoon Demo Portal Pipeline -->
  	<map:match pattern="sunspotdemoportal">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-portal"/>
  		</map:act>
  		<map:generate src="sunspotdemo/resources/free/portal.xml"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  
  	<!-- images -->
  	 <map:match pattern="sunspotdemoimg-*.gif">
  		<map:read mime-type="image/gif" src="sunspotdemo/images/{1}.gif"/>
  	</map:match>
  	<map:match pattern="sunspotdemoimg-*.jpg">
      		<map:read mime-type="image/jpg" src="sunspotdemo/images/{1}.jpg"/>
     	</map:match>
  
  	<!-- free sites -->
  	<map:match pattern="sunspotdemofree-login">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-portal"/>
  		</map:act>
  		<map:generate src="sunspotdemo/resources/free/login.xml"/>
  		<map:transform src="sunspotdemo/styles/login-html.xsl"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  	<map:match pattern="sunspotdemofree-auth">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-loggedin"/>
  		</map:act>
    	     	<map:act type="sunRise-login">
  	      	<map:parameter name="handler" value="sunspotdemohandler"/>
  			<map:parameter name="parameter_name" value="request:name"/>
  			<map:parameter name="parameter_password" value="request:password"/>
    			<map:redirect-to uri="sunspotdemo-portal"/>
  	      </map:act>
  		<map:generate src="sunspotdemo/resources/free/auth.xml"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  	<map:match pattern="sunspotdemofree-*">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-portal"/>
  		</map:act>
  		<map:generate src="sunspotdemo/resources/free/{1}.xml"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  
        <map:match pattern="sunspotdemo**">
  		<map:act type="sunRise-auth">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:parameter name="application" value="sunspotdemo"/> 
  	
  			<map:match pattern="sunspotdemoresource-save*">
  				<map:generate src="sunspotdemo/resources/save{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform type="sunShineInsert"/>
  				<map:serialize type="xml"/>
  			</map:match>
  			<map:match pattern="sunspotdemoresource-*">
  				<map:generate src="sunspotdemo/resources/{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform type="sunShineInsert"/>
  				<map:transform src="sunspotdemo/styles/portal.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  
  		<!-- sunlets -->
  			<map:match pattern="sunspotdemosunlet-onlinesundn.xml"> 
  				<map:generate src="http://www.s-und-n.de/aktuelles/news.xml"/>
  				<map:transform src="sunspotdemo/styles/sunLet_sundnNews.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  
  			<map:match pattern="sunspotdemosunlet-online-*.xml"> 
  				<map:generate src="http://p.moreover.com/cgi-local/page?index_{1}+xml"/>
  				<map:transform src="sunspotdemo/styles/sunLet_MoreoverDotCom.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  			<map:match pattern="sunspotdemosunlet-customnews">
  				<map:generate src="sunspotdemo/resources/auth/sunlet-customnews.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform src="sunspotdemo/styles/sunLet_MoreoverDotCom.xsl"/>
  				<map:serialize type="xml"/> 
  			</map:match>
  			<map:match pattern="sunspotdemosunletconf-*"> 
  				<map:generate src="sunspotdemo/resources/auth/sunletconfig-{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform src="sunspotdemo/styles/sunletconf.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  
  			<map:match pattern="sunspotdemosunlet-*.xml"> 
  				<map:generate src="sunspotdemo/resources/auth/sunlet-{1}.xml"/>
  				<map:serialize type="xml"/>
  			</map:match>
  					
  
  		<!-- auth sites -->
  
  			<map:match pattern="sunspotdemo-conf">
  				<map:generate type="sunSpot-conf"/>
  				<map:transform src="sunspotdemo/styles/portalconfHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  			<map:match pattern="sunspotdemo-adminconf">
  				<!-- This pipeline can only be accessed if the current user is
                               allowed to configure the 'administration' sunLet -->
  				<map:act type="sunSpot-auth">
  					<map:parameter name="sunLet" value="administration"/>
  				</map:act>
  				<map:generate src="admin" type="sunSpot-conf"/>
  				<map:transform src="sunspotdemo/styles/portalconfHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match> 
  			<map:match pattern="sunspotdemo-sunriseconf">
  				<!-- This pipeline can only be accessed if the current user is
                               allowed to configure the 'administration' sunLet -->
  				<map:act type="sunSpot-auth">
  					<map:parameter name="sunLet" value="administration"/>
  				</map:act>
  				<map:generate type="sunRise-conf"/>
  				<map:transform src="sunspotdemo/styles/sunriseconfHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match> 
  			<map:match pattern="sunspotdemo-sunriseedit">
  				<map:generate src="user" type="sunRise-conf"/>
  				<map:transform src="sunspotdemo/styles/sunriseeditHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match> 
  			<map:match pattern="sunspotdemo-portlets">
  				<map:generate type="sunSpot"/>
  				<map:select type="browser">
  					<map:when test="explorer">
  						<map:transform src="sunspotdemo/styles/portalHTML.xsl"/>
  					</map:when>
  					<map:when test="netscape">
  						<map:transform src="sunspotdemo/styles/portalHTML-Netscape.xsl"/>
  					</map:when>
  					<map:otherwise>
  						<map:transform src="sunspotdemo/styles/portalHTML.xsl"/>
  					</map:otherwise>
  				</map:select>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  			<map:match pattern="sunspotdemo-logout">
  				<map:act type="sunRise-logout"/>
  				<map:generate src="sunspotdemo/resources/auth/logout.xml"/>
  				<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  			<map:match pattern="sunspotdemo-*">
  				<map:generate src="sunspotdemo/resources/auth/{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform type="sunShineInsert"/>
  				<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  		</map:act>
      </map:match>
  
  </xmap>
  
  
  

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