ra::GroupMember;
use Sakai::Nakamura::GroupRole;
use Sakai::Nakamura::Group;
use Sakai::Nakamura::JsonQueryServlet;
use Sakai::Nakamura::LDAPSynch;
use Sakai::Nakamura::User;
use Sakai::Nakamura::Worl
Nakamura::GroupRole',
'group', 'Sakai::Nakamura::Group',
'json_query_servlet', 'Sakai::Nakamura::JsonQueryServlet',
'ldap_synch', 'Sakai::Nakamura::LDAPSynch',
'us
- run group role related actions
group - run group related actions
json_query_servlet - run json query servlet related actions
ldap_synch - run ldap synchronization related
perl -w
package Sakai::Nakamura::Content;
use 5.008008;
use strict;
use warnings;
use Carp;
use JSON;
use Getopt::Long qw(:config bundling);
use Pod::Usage;
use Sakai::Nakamura;
use Sakai::Nakamura:
e verbosity of output.
--view or -V (actOnContent) - view details for specified content in json format.
--view-copyright (remoteNode) - view copyright for specified remote content.
--view
h":"([^"]*)"/x )[0];
if ( !defined $content_path ) {
croak 'Content path not found in JSON response to file upload';
}
$content_path = "p/$content_path";
my $content_filename =
t_fileextension\",\"_charset_\":\"utf-8\"},\"_charset_\":\"utf-8\"},{\"url\":\"$content_path.save.json\",\"method\":\"POST\",\"_charset_\":\"utf-8\"}]']";
return "post $base_url/system/batch $post
_member']";
return
"post $base_url/system/userManager/group/$act_on_group-$act_on_role.update.json $post_variables";
}
#}}}
#{{{sub add_eval
sub add_eval {
my ($res) = @_;
return ( ${$r
#!/usr/bin/perl -w
package Sakai::Nakamura::JsonQueryServlet;
use 5.008008;
use strict;
use warnings;
use Carp;
use base qw(Apache::Sling::JsonQueryServlet);
use Sakai::Nakamura;
use Sakai::Nakamura
}}}
1;
__END__
=head1 NAME
Sakai::Nakamura::JsonQueryServlet - Manipulate the JSON query servlet in a Sakai Nakamura instance.
=head1 ABSTRACT
json query servlet related functionality for nakamu
er rest APIs.
=head1 USAGE
use Sakai::Nakamura::JsonQueryServlet;
=head1 DESCRIPTION
Perl library providing a layer of abstraction to the REST json query servlet methods
=head1 REQUIRED ARGUMENTS
$profile_update_json =
"{\"elements\":{\"$field\":{\"value\":\"$value\"}}}";
my $post_variables =
"\$post_variables = [':content','$profile_update_json',':contentType','json',':operation','
s','true']";
return
"post $base_url/~$act_on_user/public/authprofile/$profile_section.profile.json $post_variables";
}
#}}}
#{{{sub profile_update_eval
sub profile_update_eval {
my ($res) =
urn "post $base_url/system/world/create $post_variables";
}
#}}}
#{{{sub add_eval
# TODO: check JSON that is returned for success, as a 200 status code is
# returned even if the world is not success