Package fr.soleil.salsa.client.entity.event

Examples of fr.soleil.salsa.client.entity.event.DirectoryModel


     * @param directoryModel
     * @return
     */
    private DirectoryModel saveDirectory(DirectoryModel directoryModel) {
        // IDirectory directoryImpl = directoryModelWrapperFactory.unWrap(directoryModel);
        DirectoryModel savedDirectoryModel = null;
        try {
            savedDirectoryModel = (DirectoryModel) ConfigAPIClient.saveDirectory(directoryModel);

            if (directoryModel.getDirectory() != null && savedDirectoryModel.getDirectory() != null) {
                directoryModel.getDirectory().setTimestamp(
                        savedDirectoryModel.getDirectory().getTimestamp());
            }
            savedDirectoryModel.setDirectory(directoryModel.getDirectory());
            savedDirectoryModel.setConfigList(directoryModel.getConfigList());
            savedDirectoryModel.setSubDirectoriesList(directoryModel.getSubDirectoriesList());
            // savedDirectoryModel = directoryModelWrapperFactory.wrap(savedDirectoryImpl);
        }
        catch (PersistenceException e) {
            e.printStackTrace();
            applicationController.errorMessage("Error saving directory " + directoryModel.getName()
View Full Code Here


     * @param directoryModel
     * @return
     */
    private DirectoryModel saveDirectoryRecursive(DirectoryModel directoryModel) {
        directoryModel.setName(directoryModel.getName() + " (copy)");
        DirectoryModel savedDirectoryModel = saveDirectory(directoryModel);
        for (IDirectory subDirectory : savedDirectoryModel.getSubDirectoriesList()) {
            saveDirectoryRecursive((DirectoryModel) subDirectory);
        }
        for (IConfig<?> config : savedDirectoryModel.getConfigList()) {
            config.setDirectory(savedDirectoryModel);
            config.setName(config.getName() + " (copy)");
            saveConfig(config);
        }
        return savedDirectoryModel;
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.client.entity.event.DirectoryModel

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.