public static CmsXmlGroupContainer unmarshal(CmsObject cms, CmsResource resource, ServletRequest req)
    throws CmsXmlException, CmsLoaderException, CmsException {

        String rootPath = resource.getRootPath();

        // try to get the requested content from the current request attribute
        // this is also necessary for historic versions that have been loaded
        CmsXmlGroupContainer content = (CmsXmlGroupContainer)req.getAttribute(rootPath);

        if (content == null) {
            // unmarshal XML structure from the file content
            content = unmarshal(cms, resource);
            // store the content as request attribute for future read requests
            req.setAttribute(rootPath, content);
        }

        // return the result
        return content;
    }
public static CmsXmlGroupContainer unmarshal ( CmsObject cms , CmsResource resource , ServletRequest req ) throws CmsXmlException , CmsLoaderException , CmsException { String rootPath = resource . getRootPath ( ) ; CmsXmlGroupContainer content = ( CmsXmlGroupContainer ) req . getAttribute ( rootPath ) ; if ( content == null ) { content = unmarshal ( cms , resource ) ; req . setAttribute ( rootPath , content ) ; } return content ; }
Factory method to unmarshal (read) a group container instance from
a resource, using the request attributes as cache.<p>

@param cms the current OpenCms context object
@param resource the resource to unmarshal
@param req the current request

@return the unmarshaled xml content

@throws CmsException in something goes wrong
@throws CmsLoaderException if no loader for the given <code>resource</code> type ({@link CmsResource#getTypeId()}) is available
@throws CmsXmlException if the given <code>resource</code> is not of type group container