Package org.apache.lenya.cms.publication

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


                destinationDirectory.mkdirs();
            }
            FileUtils.copyFileToDirectory(file, destinationDirectory);
            destinationDocument.getDublinCore().replaceBy(sourceDocument.getDublinCore());
        } catch (IOException e) {
            throw new PublicationException(e);
        }
    }
View Full Code Here


     */
    protected void deleteDocumentSource(Document document) throws PublicationException {
        File file = document.getFile();
        boolean deleted = file.delete();
        if (!deleted) {
            throw new PublicationException(
                "Source file [" + file + "] of document [" + document + "] could not be deleted!");
        }
    }
View Full Code Here

        }

        try {
            deactivateAllLanguageVersions(document);
        } catch (WorkflowException e) {
            throw new PublicationException(e);
        }
    }
View Full Code Here

            }
            if (publish) {
                publishAllLanguageVersions(document);
            }
        } catch (WorkflowException e) {
            throw new PublicationException(e);
        }
    }
View Full Code Here

                if (availableLanguages[i].equals(document.getLanguage())) {
                    newDocument = newLanguageVersion;
                }
            }
        } catch (TransactionException e) {
            throw new PublicationException(e);
        } finally {
            if (documentManager != null) {
                this.manager.release(documentManager);
            }
        }
View Full Code Here

                destinationDirectory.mkdirs();
            }
            FileUtil.copyFileToDirectory(file, destinationDirectory);
            destinationDocument.getDublinCore().replaceBy(sourceDocument.getDublinCore());
        } catch (IOException e) {
            throw new PublicationException(e);
        }
    }
View Full Code Here

     */
    protected void deleteDocumentSource(Document document) throws PublicationException {
        File file = document.getFile();
        boolean deleted = file.delete();
        if (!deleted) {
            throw new PublicationException(
                "Source file [" + file + "] of document [" + document + "] could not be deleted!");
        }
    }
View Full Code Here

            if (!destinationDirectory.isDirectory()) {
                destinationDirectory.mkdirs();
            }
            FileUtil.copyFileToDirectory(file, destinationDirectory);
        } catch (IOException e) {
            throw new PublicationException(e);
        }
    }
View Full Code Here

     */
    protected void deleteDocumentSource(Document document) throws PublicationException {
        File file = document.getFile();
        boolean deleted = file.delete();
        if (!deleted) {
            throw new PublicationException(
                "Source file of document [" + document.getId() + "] could not be deleted!");
        }
    }
View Full Code Here

                destinationDirectory.mkdirs();
            }
            FileUtil.copyFileToDirectory(file, destinationDirectory);
            destinationDocument.getDublinCore().replaceBy(sourceDocument.getDublinCore());
        } catch (IOException e) {
            throw new PublicationException(e);
        }
    }
View Full Code Here

TOP

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

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.