Examples of CampaignStorageException


Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

        logger.info("Connecting to storage for campaign: " + campaign);

        // sanity checks
        if(campaign == null) {
            throw new CampaignStorageException("No campaign set!");
        }
        if(campaign.getStorageUri() == null) {
            throw new CampaignStorageException("Storage URI not set for campaign: " + campaign);
        }

        File storagePathFile = new File(storagePath);
        if(!storagePathFile.exists()) {
            logger.info("Storage path doesn't exist; creating: " + storagePath);
            PathUtils.createPath(storagePath);
        }

        // checks if the directory is present
        if(!storagePathFile.exists()) {
            throw new CampaignStorageException("Can't find storage path: " + storagePath);
        }
        if(!storagePathFile.isDirectory()) {
            throw new CampaignStorageException("Storage path is not a directory: " + storagePath);
        }

        // check if the directory is readable and writable
        if(!storagePathFile.canRead()) {
            throw new CampaignStorageException("Storage path is not readable: " + storagePath);
        }
        if(!storagePathFile.canWrite()) {
            throw new CampaignStorageException("Storage path is not writable: " + storagePath);
        }

        doSetStatus(CampaignStorageConstants.STORAGE_STATUS_ONLINE);

        logger.info("Connection established to local file storage: " + storagePath);
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.core.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load core campaign data for: " + guid + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.setting.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load setting data for: " + id + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.version.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load version data for: " + id + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.event.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load campaign event data for: " + id + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.library.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load library data for: " + id + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.object_category.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load object category data for: " + id + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.object_data.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException(
                    "Unable to load object data for: " + id + ": " + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.object_instance.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load object instance data for: " + id + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.campaign.services.storage.CampaignStorageException

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.storage.local.error.load.object_property.text")
                    + ": " + e.getLocalizedMessage()));

            throw new CampaignStorageException("Unable to load object property data for: " + id + ": "
                    + e.getLocalizedMessage(), e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.