コード例 #1
0
  @AccessControlled(guestAccessEnabled = true)
  @Override
  public List<SkinnyDDLRecord> getSkinnyDDLRecords(long ddlRecordSetId) throws Exception {

    List<SkinnyDDLRecord> skinnyDDLRecords = new ArrayList<>();

    PermissionChecker permissionChecker = getPermissionChecker();

    DDLRecordSet ddlRecordSet = ddlRecordSetLocalService.getRecordSet(ddlRecordSetId);

    if (permissionChecker.hasPermission(
        ddlRecordSet.getGroupId(),
        DDLRecordSet.class.getName(),
        ddlRecordSet.getRecordSetId(),
        ActionKeys.VIEW)) {

      for (DDLRecord ddlRecord : ddlRecordSet.getRecords()) {
        SkinnyDDLRecord skinnyDDLRecord = getSkinnyDDLRecord(ddlRecord);

        skinnyDDLRecords.add(skinnyDDLRecord);
      }
    }

    return skinnyDDLRecords;
  }
コード例 #2
0
  protected boolean hasWorkflowEnabled(DDLRecordSet recordSet, ThemeDisplay themeDisplay) {

    return _workflowDefinitionLinkLocalService.hasWorkflowDefinitionLink(
        themeDisplay.getCompanyId(), recordSet.getGroupId(),
        DDLRecordSet.class.getName(), recordSet.getRecordSetId());
  }