Package org.apache.jetspeed.om.cms.slide

Examples of org.apache.jetspeed.om.cms.slide.SlideResource


  */
  public Resource getResource (String uri )
       throws JetspeedCMSException
  {

    SlideResource resource = null;

    try
    {
      String userNode = this.getSlideUserNode();
     
      // Get the last NodeRevisionDescriptor
      SlideToken slideToken = this.getSlideToken( userNode );

      // uri parameter can be point to a linkNode => retrieve its target
      // objectnode
      ObjectNode objectNode = structure.retrieve(slideToken, uri, true);

      // Get the last Node revision descriptor
      NodeRevisionDescriptors revisionDescriptors =
         content.retrieve(slideToken, objectNode.getUri());
      NodeRevisionDescriptor revisionDescriptor =
         content.retrieve(slideToken, revisionDescriptors);

      // Check if the resource is a Catalog or an ContentItem
      // (based on the property class name) & an create an object for this resource
      NodeProperty p = revisionDescriptor.getProperty(PROPERTY_CLASS_NAME);
      String className = (String) p.getValue();
      resource = (SlideResource) Class.forName( className ).newInstance();
      resource.setUri(uri);
      // Populate the resource properties
      resource.setDescriptor(revisionDescriptor);

      // populate Security info
      resource.setPermissions(this.getSecurity(uri));
      return resource;
    }
    catch (AccessDeniedException e)
    {
      JetspeedCMSException e1 = new JetspeedCMSException("Impossible to get the content resource");
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.cms.slide.SlideResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.