[Building Sakai] Tool Database - Metadata
Jim Eng
jimeng at umich.edu
Thu Mar 12 06:14:39 PDT 2009
Hi Iuliana,
I would inject the ContentHostingService into my application. So your
class might have a setter like this:
protected org.sakaiproject.content.api.ContentHostingService
contentService;
public void setContentHostingService(ContentHostingService
contentService)
{
this.contentService = contentService;
}
Then if you have a resource_id, you can access that resource using one
of the API methods, such as:
http://source.sakaiproject.org/release/2.5.3/apidocs/org/sakaiproject/content/api/ContentHostingService.html#getResource(java.lang.String)
Notice that you will want to wrap that in a try-catch.
The resource itself has setters and getters for some properties.
http://source.sakaiproject.org/release/2.5.3/apidocs/org/sakaiproject/content/api/ContentResource.html
Others are in the ResourceProperties:
http://source.sakaiproject.org/release/2.5.3/apidocs/org/sakaiproject/entity/api/Entity.html#getProperties()
http://source.sakaiproject.org/release/2.5.3/apidocs/org/sakaiproject/entity/api/ResourceProperties.html
Hope this helps.
Jim
On Mar 12, 2009, at 8:44 AM, Iuliana wrote:
> Jim...
>
> I send this same e-mail, but i think you do not receive.
> What are the resources table metadata and where, inside the classes
> in content-impl, I have the resources metadata(fields of table)?
> What are the class I need import to my project to access this class
> in the database?
>
> Thanks again,
> iuliana.
>
> msn: iusouza at hotmail.com
> Skype-me: iusouza
>
> --
> Iuliana Souza
> Graduada em Análise de Sistemas
> (16) 9963-9155
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090312/47c620ef/attachment.html
More information about the sakai-dev
mailing list