WebService::Cmis::Client - Transport layer
A CMIS client is used to communicate with the document manangement server by connecting to an exposed web service. It provides the initial access function to the repositories.
A client may use one of the user agents to authenticate against the CMIS backend, as specified by the =useragent= parameter during object construction. By default a user agent will be used performing HTTP basic auth as a fallback implemented by most CMIS servers.
Available user agents are:
WebService::Cmis::Agent::BasicAuth (default)
WebService::Cmis::Agent::TockenAuth
WebService::Cmis::Agent::CookieAuth
use Cache::FileCache (); my $client = WebService::Cmis::getClient( url => "http://cmis.alfresco.com/service/cmis", cache => new Cache::FileCache({ cache_root => "/tmp/cmis_client" }, useragent => new WebSercice::Cmis::Agent::BasicAuth( user => "...", password => "..." ) ) ) my $repo = $client->getRepository;
Parent class: REST::Client
Create a new WebService::Cmis::Client. This requires a url of the webservice api, as well as a valid useragent handler.
See REST::Client for more options.
Parameters:
useragent - handler to be used for authentication
"WebService::Cmis::Agent::BasicAuth" (default)
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
setter to assert the user agent to be used in the REST::Client
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. returns an identifier for the internal state of the user agent that may be used to login again later on.
my $ticket = $client->login( user=> $user, password => $password ); $client->login( user => $user, ticket => $ticket );
Logs out of the web service invalidating a stored state within the auth handler.
Copyright 2012-2013 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.