Package com.dotmarketing.portlets.containers.business

Examples of com.dotmarketing.portlets.containers.business.ContainerAPI


      //Looking for children containers overriding inheritance to also apply the cascade changes
      dc.setSQL(selectChildrenContainerWithIndividualPermissionsSQL);
      dc.addParam(host.getPermissionId());
      idsToUpdate = dc.loadResults();
      ContainerAPI containerAPI = APILocator.getContainerAPI();
      permission = 0;
      if (inheritablePermission != null) {
        permission = inheritablePermission.getPermission();
      }
      for (Map<String, String> idMap : idsToUpdate) {
        String id = idMap.get("id");
        Permissionable childPermissionable;
        try {
          childPermissionable = containerAPI.getWorkingContainerById(id, systemUser, false);
        } catch (DotSecurityException e) {
          Logger.error(PermissionBitFactoryImpl.class, e.getMessage(), e);
          throw new DotRuntimeException(e.getMessage(), e);
        }
        savePermission(new Permission(id, role.getId(), permission, true), childPermissionable);
View Full Code Here


          templateAPI.delete(template, user, respectFrontendRoles);
        }

        // Remove Containers
        ContainerAPI containerAPI = APILocator.getContainerAPI();
        List<Container> containers = containerAPI.findContainers(user, true, null, host.getIdentifier(), null, null, null, 0, -1, null);
        for (Container container : containers) {
          containerAPI.delete(container, user, respectFrontendRoles);
        }

        // Remove Structures
        List<Structure> structures = StructureFactory.getStructures(" host = '" + host.getIdentifier() + "'", null, 0, 0, null);
        for (Structure structure : structures) {
View Full Code Here

          templateAPI.delete(template, user, respectFrontendRoles);
        }

        // Remove Containers
        ContainerAPI containerAPI = APILocator.getContainerAPI();
        List<Container> containers = containerAPI.findContainers(user, true, null, host.getIdentifier(), null, null, null, 0, -1, null);
        for (Container container : containers) {
          containerAPI.delete(container, user, respectFrontendRoles);
        }

        // Remove Structures
        List<Structure> structures = StructureFactory.getStructures(" host = '" + host.getIdentifier() + "'", null, 0, 0, null);
        for (Structure structure : structures) {
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.containers.business.ContainerAPI

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.