Skip to content
Snippets Groups Projects
Commit 0f9cb5b1 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

rename class, for less ambiguity

parent ddda880a
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,8 @@ use Pod::Usage;
use AccountManager::Account;
use AccountManager::Account::Manager;
use AccountManager::Metadata;
use AccountManager::Service;
use AccountManager::Service::Manager;
use AccountManager::ServiceProvider;
use AccountManager::ServiceProvider::Manager;
use AccountManager::Token;
use AccountManager::Token::Manager;
use AccountManager::Tools;
......@@ -198,7 +198,7 @@ sub add_service {
) unless $options{contacts};
## Check if entry already exists in DB first
my $provider = AccountManager::Service->new(
my $provider = AccountManager::ServiceProvider->new(
db => $db,
entityid => $options{sp_entityid}
);
......@@ -209,7 +209,7 @@ sub add_service {
$provider->contacts($options{contacts});
$provider->displayname($options{displayname}) if $options{displayname};
} else {
$provider = AccountManager::Service->new(
$provider = AccountManager::ServiceProvider->new(
db => $db,
entityid => $options{sp_entityid},
contacts => $options{contacts},
......@@ -226,7 +226,7 @@ sub add_service {
sub list_services {
my %args;
my $providers = AccountManager::Service::Manager->get_services(db => $db, %args);
my $providers = AccountManager::ServiceProvider::Manager->get_service_providers(db => $db, %args);
if (! @$providers) {
printf "No service provider in DB\n";
......
......@@ -13,7 +13,7 @@ use Template::Constants qw(:chomp);
use AccountManager::Account;
use AccountManager::Account::Manager;
use AccountManager::Metadata;
use AccountManager::Service;
use AccountManager::ServiceProvider;
use AccountManager::Token;
use AccountManager::Tools;
use AccountManager::L10N;
......@@ -302,7 +302,7 @@ sub req_select_email {
) if $entityid !~ $entity_id_pattern;
# Create a persistent service provider object
my $sp = AccountManager::Service->new(
my $sp = AccountManager::ServiceProvider->new(
db => $self->{db},
entityid => $entityid
);
......@@ -398,7 +398,7 @@ sub req_complete_challenge {
user => "missing_email"
) if !$email;
my $provider = AccountManager::Service->new(
my $provider = AccountManager::ServiceProvider->new(
db => $self->{db},
entityid => $entityid,
);
......
package AccountManager::Service::Manager;
use strict;
use warnings;
use base qw(Rose::DB::Object::Manager);
use AccountManager::Service;
sub object_class { 'AccountManager::Service' }
__PACKAGE__->make_manager_methods('services');
1;
package AccountManager::Service;
package AccountManager::ServiceProvider;
use strict;
use warnings;
......
package AccountManager::ServiceProvider::Manager;
use strict;
use warnings;
use base qw(Rose::DB::Object::Manager);
use AccountManager::ServiceProvider;
sub object_class { 'AccountManager::ServiceProvider' }
__PACKAGE__->make_manager_methods('service_providers');
1;
......@@ -6,8 +6,8 @@ nobase_modules_DATA = \
AccountManager/DB.pm \
AccountManager/DB/Object.pm \
AccountManager/Metadata.pm \
AccountManager/Service.pm \
AccountManager/Service/Manager.pm \
AccountManager/ServiceProvider.pm \
AccountManager/ServiceProvider/Manager.pm \
AccountManager/Account.pm \
AccountManager/Account/Manager.pm \
AccountManager/Tools.pm \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment