Package org.apache.lenya.cms.publication

Examples of org.apache.lenya.cms.publication.Resource


        try {

            // Retrieve the resource instance via the ResourcesManager
            resourcesManager = (ResourcesManager)
                this.manager.lookup(ResourcesManager.ROLE);
            Resource theResource =
                resourcesManager.getResource(getSourceDocument(), assetName);
            if (theResource == null)
                throw new Exception("no such resource [" + assetName + "] exists for document [ " + getSourceDocument().getId() + "]");

            // Lock the resource nodes
            List nodes = new ArrayList();
            nodes.addAll(Arrays.asList(theResource.getRepositoryNodes()));
            lockInvolvedObjects((Transactionable[])nodes.toArray(new Transactionable[nodes.size()]));

            // Delete the resource
            resourcesManager.deleteResource(theResource);
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.publication.Resource

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.