Class: Packages::Maven::Metadata::SyncService

Inherits:
BaseContainerService show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/packages/maven/metadata/sync_service.rb

Constant Summary collapse

MAX_FILE_SIZE =
10.megabytes.freeze

Instance Attribute Summary

Attributes inherited from BaseContainerService

#container, #current_user, #params

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from BaseContainerService

#group_container?, #initialize, #namespace_container?, #project_container?

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

This class inherits a constructor from BaseContainerService

Instance Method Details

#executeObject


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/services/packages/maven/metadata/sync_service.rb', line 13

def execute
  return error('Blank package name') unless package_name
  return error('Not allowed') unless Ability.allowed?(current_user, :destroy_package, project)

  result = success('Non existing versionless package(s). Nothing to do.')

  # update versionless package for plugins if it exists
  if 
    result = update_plugins_xml

    return result if result.error?
  end

  # update versionless_package for versions if it exists
  return update_versions_xml if 

  result
end