WebService::Cmis::Client - Transport layer
This is the workhorse communicating with the document manangement server by connecting to the REST service. It provides the initial access function to the repositories.
use Cache::FileCache (); my $client = WebService::Cmis::getClient( url => "http://cmis.alfresco.com/service/cmis", cache => new Cache::FileCache({ cache_root => "/tmp/cmis_client" } ) ) my $repo = $client->getRepository;
Parent class: REST::Client
Create a new WebService::Cmis::Client object. This requires a url of the webservice api, as well as a user and password for authentication.
Parameters:
user
password
url - repository url; example:
"http://localhost:8080/alfresco/service/cmis"
cache - a Cache::Cache object to be used for caching
overrideCacheContrib - boolean flag to ignore any http cache control for more aggressive caching
loginUrl - url used for ticket-based authentication; example:
"http://localhost:8080/alfresco/service/api/login?u={username}&pw={password}"
logoutUrl - url used for ticket-based authentication; example:
"http://localhost:8080/alfresco/service/api/login/ticket/{ticket}"
See REST::Client for more options.
return a string representation of this client
nukes all of the cache. calling this method is sometimes required to work around caching effects.
purges outdated cache entries. call this method in case the cache backend is able to do a kind of house keeping.
removes an item from the cache associated with the given path and url parameters
does a get against the CMIS service. More than likely, you will not need to call this method. Instead, let the other objects to it for you.
add a cache layer on top of all network connections of the rest client
returns the full content of a response
returns the HTTP status code of the repsonse
returns the "code message" of the response. (See HTTP::Status)
returns the base uri for this response
does a post against the CMIS service. More than likely, you will not need to call this method. Instead, let the other objects to it for you.
does a put against the CMIS service. More than likely, you will not need to call this method. Instead, let the other objects to it for you.
does a delete against the CMIS service. More than likely, you will not need to call this method. Instead, let the other objects to it for you.
throws a client or a server exception based on the http error code of the last transaction.
returns a hash of WebService::Cmis::Repository objects available at this service.
returns a WebService::Cmis::Repository of the given ID. if ID is undefined the default repository will be returned.
returns the number of times a result has been fetched from the cache instead of accessing the CMIS backend. returns undefined when no cache is configured
logs in to the web service
ticket
Login using basic auth. If a loginUrl is configured, a ticket will be aquired to be used for later logins by the same user.
loginUrl
$client->login({ user => "user", password => "pasword" }); $ticket = $client->{ticket}; $client->login({ user => "user", ticket => "ticket" });
logs out of the web service deleting a ticket previously aquired
Copyright 2012 Michael Daum
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/artistic.html.
To install WebService::Cmis, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Cmis
CPAN shell
perl -MCPAN -e shell install WebService::Cmis
For more information on module installation, please visit the detailed CPAN module installation guide.