public AssetCategory moveCategory(
      long categoryId, long parentCategoryId, long vocabularyId, ServiceContext serviceContext)
      throws PortalException, SystemException {

    AssetCategoryPermission.check(getPermissionChecker(), categoryId, ActionKeys.UPDATE);

    return assetCategoryLocalService.moveCategory(
        categoryId, parentCategoryId, vocabularyId, serviceContext);
  }
  public void deleteCategories(long[] categoryIds) throws PortalException, SystemException {

    PermissionChecker permissionChecker = getPermissionChecker();

    for (long categoryId : categoryIds) {
      AssetCategory category = assetCategoryPersistence.fetchByPrimaryKey(categoryId);

      if (category == null) {
        continue;
      }

      AssetCategoryPermission.check(permissionChecker, categoryId, ActionKeys.DELETE);

      assetCategoryLocalService.deleteCategory(category);
    }
  }
  public AssetCategory updateCategory(
      long categoryId,
      long parentCategoryId,
      Map<Locale, String> titleMap,
      Map<Locale, String> descriptionMap,
      long vocabularyId,
      String[] categoryProperties,
      ServiceContext serviceContext)
      throws PortalException, SystemException {

    AssetCategoryPermission.check(getPermissionChecker(), categoryId, ActionKeys.UPDATE);

    return assetCategoryLocalService.updateCategory(
        getUserId(),
        categoryId,
        parentCategoryId,
        titleMap,
        descriptionMap,
        vocabularyId,
        categoryProperties,
        serviceContext);
  }
  public AssetCategory addCategory(
      long parentCategoryId,
      Map<Locale, String> titleMap,
      Map<Locale, String> descriptionMap,
      long vocabularyId,
      String[] categoryProperties,
      ServiceContext serviceContext)
      throws PortalException, SystemException {

    AssetCategoryPermission.check(
        getPermissionChecker(),
        serviceContext.getScopeGroupId(),
        parentCategoryId,
        ActionKeys.ADD_CATEGORY);

    return assetCategoryLocalService.addCategory(
        getUserId(),
        parentCategoryId,
        titleMap,
        descriptionMap,
        vocabularyId,
        categoryProperties,
        serviceContext);
  }
  public void deleteCategory(long categoryId) throws PortalException, SystemException {

    AssetCategoryPermission.check(getPermissionChecker(), categoryId, ActionKeys.DELETE);

    assetCategoryLocalService.deleteCategory(categoryId);
  }
  public AssetCategory getCategory(long categoryId) throws PortalException, SystemException {

    AssetCategoryPermission.check(getPermissionChecker(), categoryId, ActionKeys.VIEW);

    return assetCategoryLocalService.getCategory(categoryId);
  }