Search in sources :

Example 1 with ModelPermissionBatch

use of com.liferay.imex.core.api.permission.model.ModelPermissionBatch in project liferay-imex by jpdacunha.

the class ImexModelPermissionSetterImpl method setPermissions.

/*
	 * (non-Javadoc)
	 * @see com.liferay.portal.permission.service.ModelPermissionSetter#setPermissions(java.util.List, com.liferay.portal.permission.util.PermissionMessageLogger)
	 */
public int setPermissions(List<ModelPermissionBatch> batchs) throws PortalException, SystemException {
    int nbOk = 0;
    if (batchs != null) {
        for (ModelPermissionBatch batch : batchs) {
            if (batch != null) {
                this.setPermissions(batch);
                nbOk++;
            }
        }
    }
    return nbOk;
}
Also used : ModelPermissionBatch(com.liferay.imex.core.api.permission.model.ModelPermissionBatch)

Example 2 with ModelPermissionBatch

use of com.liferay.imex.core.api.permission.model.ModelPermissionBatch in project liferay-imex by jpdacunha.

the class ImexModelPermissionSetterImpl method setPermissions.

public void setPermissions(Properties props, Bundle bundle, Resource resource) throws SystemException, PortalException {
    String batchId = bundle.getSymbolicName();
    boolean reinitOnset = reader.isReinitOnset(batchId, props);
    List<ModelRolePermissionBatch> roleBatchs = reader.getRolesBatchs(batchId, props);
    ModelPermissionBatch batch = new ModelPermissionBatch(resource, batchId, reinitOnset, roleBatchs);
    setPermissions(batch);
}
Also used : ModelPermissionBatch(com.liferay.imex.core.api.permission.model.ModelPermissionBatch) ModelRolePermissionBatch(com.liferay.imex.core.api.permission.model.ModelRolePermissionBatch)

Aggregations

ModelPermissionBatch (com.liferay.imex.core.api.permission.model.ModelPermissionBatch)2 ModelRolePermissionBatch (com.liferay.imex.core.api.permission.model.ModelRolePermissionBatch)1