Search in sources :

Example 1 with Organization

use of com.ableneo.liferay.portal.setup.domain.Organization in project liferay-db-setup-core by ableneo.

the class LiferaySetup method deleteObjects.

private static void deleteObjects(final List<ObjectsToBeDeleted> objectsToBeDeleted) {
    for (ObjectsToBeDeleted otbd : objectsToBeDeleted) {
        if (otbd.getRoles() != null) {
            List<com.ableneo.liferay.portal.setup.domain.Role> roles = otbd.getRoles().getRole();
            SetupRoles.deleteRoles(roles, otbd.getDeleteMethod());
        }
        if (otbd.getUsers() != null) {
            List<com.ableneo.liferay.portal.setup.domain.User> users = otbd.getUsers().getUser();
            SetupUsers.deleteUsers(users, otbd.getDeleteMethod());
        }
        if (otbd.getOrganizations() != null) {
            List<Organization> organizations = otbd.getOrganizations().getOrganization();
            SetupOrganizations.deleteOrganization(organizations, otbd.getDeleteMethod());
        }
        if (otbd.getCustomFields() != null) {
            List<CustomFields.Field> customFields = otbd.getCustomFields().getField();
            SetupCustomFields.deleteCustomFields(customFields, otbd.getDeleteMethod());
        }
        if (otbd.getSites() != null) {
            final List<Site> siteList = otbd.getSites().getSite();
            SetupSites.deleteSite(siteList, otbd.getDeleteMethod());
        }
    }
}
Also used : Site(com.ableneo.liferay.portal.setup.domain.Site) Organization(com.ableneo.liferay.portal.setup.domain.Organization) ObjectsToBeDeleted(com.ableneo.liferay.portal.setup.domain.ObjectsToBeDeleted)

Aggregations

ObjectsToBeDeleted (com.ableneo.liferay.portal.setup.domain.ObjectsToBeDeleted)1 Organization (com.ableneo.liferay.portal.setup.domain.Organization)1 Site (com.ableneo.liferay.portal.setup.domain.Site)1