コード例 #1
0
  @Override
  public void addVocabularyResources(
      AssetVocabulary vocabulary, String[] groupPermissions, String[] guestPermissions)
      throws PortalException {

    resourceLocalService.addModelResources(
        vocabulary.getCompanyId(),
        vocabulary.getGroupId(),
        vocabulary.getUserId(),
        AssetVocabulary.class.getName(),
        vocabulary.getVocabularyId(),
        groupPermissions,
        guestPermissions);
  }
コード例 #2
0
  @Override
  public void addVocabularyResources(
      AssetVocabulary vocabulary, boolean addGroupPermissions, boolean addGuestPermissions)
      throws PortalException {

    resourceLocalService.addResources(
        vocabulary.getCompanyId(),
        vocabulary.getGroupId(),
        vocabulary.getUserId(),
        AssetVocabulary.class.getName(),
        vocabulary.getVocabularyId(),
        false,
        addGroupPermissions,
        addGuestPermissions);
  }
コード例 #3
0
  @Indexable(type = IndexableType.DELETE)
  @Override
  @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
  public void deleteVocabulary(AssetVocabulary vocabulary) throws PortalException {

    // Vocabulary

    assetVocabularyPersistence.remove(vocabulary);

    // Resources

    resourceLocalService.deleteResource(
        vocabulary.getCompanyId(),
        AssetVocabulary.class.getName(),
        ResourceConstants.SCOPE_INDIVIDUAL,
        vocabulary.getVocabularyId());

    // Categories

    assetCategoryLocalService.deleteVocabularyCategories(vocabulary.getVocabularyId());
  }