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());
}
}
}
Aggregations