You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Peter Shipley <ps...@nomensa.com> on 2005/04/21 15:17:49 UTC

Checkout Exceptions - Get user details

I would like to get the full user name and email address from the user
who has a lock on a file. This way, when rco-exception.xsl is called it
will show the real name of the person with the lock and an email address
to contact them.

I was assuming I could do something like get the userid from the
checkout, and perform a lookup to get the user.

Any ideas ?

Regards

Peter

--
Nomensa - Humanising technology

Peter Shipley             |  Application Developer
t. +44 (0)117 929 7333

Enrol now for professional training in Web Accessibility - Course
schedule now available!

http://www.nomensa.com/services/training/accessibility-explained.html  

--
Visit our web site today:
http://www.nomensa.com/

Nomensa Email Disclaimer:
http://www.nomensa.com/email-disclaimer.html 

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


Re: embedding rdf

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Michael Wechner wrote:

>> looks good to me. the problem of embedding rdf is not that easy, after 
>> all. it is even a w3c TAG issue:
>>
>> http://www.w3.org/2001/tag/issues.html?type=1#RDFinXHTML-35
>>
>> i think we should embed rdf by default. why bother with metadata 
>> otherwise?
> 
> 
> 
> well, I think it would make sense to closer collaborate with the Simile 
> project
> (where Stefano is working on) and see if we find some synergies.

sure. in the meantime, i like what moveable type is doing:

<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
          xmlns:dc="http://purl.org/dc/elements/1.1/"
          xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="http://greg.abstrakt.ch/">
<dc:title>Gregor J. Rothfuss</dc:title>
<dc:description></dc:description>
<license rdf:resource="http://creativecommons.org/licenses/by-sa/1.0/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by-sa/1.0/">
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</License>
</rdf:RDF>
-->

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


Re: embedding rdf

Posted by Michael Wechner <mi...@wyona.com>.
Gregor J. Rothfuss wrote:

> Lee Carroll wrote:
>
>> Hello,
>> I've added a dirty hack to strip_namespaces.xsl to embed rdf into 
>> lenya's html output.
>>
>> I could not think of an elegant solution for this and it looks brutal 
>> (see below). Has anyone got a better Idea?
>
>
> looks good to me. the problem of embedding rdf is not that easy, after 
> all. it is even a w3c TAG issue:
>
> http://www.w3.org/2001/tag/issues.html?type=1#RDFinXHTML-35
>
> i think we should embed rdf by default. why bother with metadata 
> otherwise?


well, I think it would make sense to closer collaborate with the Simile 
project
(where Stefano is working on) and see if we find some synergies.

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


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


embedding rdf

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Lee Carroll wrote:
> Hello,
> I've added a dirty hack to strip_namespaces.xsl to embed rdf into 
> lenya's html output.
> 
> I could not think of an elegant solution for this and it looks brutal 
> (see below). Has anyone got a better Idea?

looks good to me. the problem of embedding rdf is not that easy, after 
all. it is even a w3c TAG issue:

http://www.w3.org/2001/tag/issues.html?type=1#RDFinXHTML-35

i think we should embed rdf by default. why bother with metadata otherwise?

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


Re: Checkout Exceptions - Get user details

Posted by Lee Carroll <le...@aol.com>.
Hello,
I've added a dirty hack to strip_namespaces.xsl to embed rdf into lenya's 
html output.

I could not think of an elegant solution for this and it looks brutal (see 
below). Has anyone got a better Idea?

Lee C


<xsl:template match="rdf:RDF">
 <xsl:comment>
      <xsl:text> </xsl:text><xsl:text>&lt;</xsl:text><xsl:value-of 
select="name()"/>
       <xsl:text> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;</xsl:text>
            <xsl:apply-templates/>
        <xsl:text>&lt;/</xsl:text><xsl:value-of 
select="name()"/><xsl:text>&gt;</xsl:text>
        <xsl:text> </xsl:text>
  </xsl:comment>
</xsl:template>


<xsl:template match="rdf:* |dc:*">
<xsl:text>&lt;</xsl:text><xsl:value-of select="name()"/>
<xsl:for-each select="@*">
<xsl:text> </xsl:text><xsl:value-of 
select="local-name()"/><xsl:text>="</xsl:text><xsl:value-of 
select="."/><xsl:text>"</xsl:text>
</xsl:for-each>
<xsl:text>&gt;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&lt;/</xsl:text><xsl:value-of 
select="name()"/><xsl:text>&gt;</xsl:text>
</xsl:template> 


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


Re: Checkout Exceptions - Get user details

Posted by Peter Shipley <pe...@windj.ath.cx>.
Gregor J. Rothfuss wrote:
> Peter Shipley wrote:
> 
>> I would like to get the full user name and email address from the user
>> who has a lock on a file. This way, when rco-exception.xsl is called it
>> will show the real name of the person with the lock and an email address
>> to contact them.
>>
>> I was assuming I could do something like get the userid from the
>> checkout, and perform a lookup to get the user.
> 
> 
> the rc exception code already takes the user as an argument:
> 
>               <map:generate type="serverpages" 
> src="../../content/rc/{exception}.xsp">
>                 <map:parameter name="user" value="{user}"/>
>                 <map:parameter name="filename" value="{filename}"/>
>                 <map:parameter name="date" value="{date}"/>
>               </map:generate>
>               <map:transform src="../../xslt/rc/rco-exception.xsl"/>
>               <map:call resource="style-cms-page"/>
> 

Does it ?

ReservedCheckoutAction.java
---------------------------

             getRc().reservedCheckOut(getFilename(), getUsername());
         } catch (FileReservedCheckOutException e) {
             actionMap.put("exception", "fileReservedCheckOutException");
             actionMap.put("filename", getFilename());
             actionMap.put("user", e.getCheckOutUsername());

Seems {user} simply stores the string userid and not the user object.


FileReservedCheckOutException.java
----------------------------------
          checkOutUsername = coe.getIdentity();

CheckOutEntry.java
-------------------
public CheckOutEntry(String identity, long time, long version) {
         super(identity, time, version);

It seems to me (and I must admit I have struck a complete blank here so 
may have missed things) that the information available stemming from the 
original CheckOut only ever uses the userid string.

Regards

Pete

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


Re: Checkout Exceptions - Get user details

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Peter Shipley wrote:
> I would like to get the full user name and email address from the user
> who has a lock on a file. This way, when rco-exception.xsl is called it
> will show the real name of the person with the lock and an email address
> to contact them.
> 
> I was assuming I could do something like get the userid from the
> checkout, and perform a lookup to get the user.

the rc exception code already takes the user as an argument:

     	      <map:generate type="serverpages" 
src="../../content/rc/{exception}.xsp">
         	    <map:parameter name="user" value="{user}"/>
             	<map:parameter name="filename" value="{filename}"/>
	            <map:parameter name="date" value="{date}"/>
     	      </map:generate>
         	  <map:transform src="../../xslt/rc/rco-exception.xsl"/>
	          <map:call resource="style-cms-page"/>


you just need to tweak the xsp a little bit to give the full name (or 
whatever else you need from the user object)

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