Hide Show 13 lines of Pod
use
WebService::Cmis
qw(:namespaces :collections :utils :relations :contenttypes)
;
our
$CMIS_XPATH_REPOSITORYINFO
= new XML::LibXML::XPathExpression(
'./*[local-name() = "repositoryInfo" and namespace-uri() = "'
.CMISRA_NS.
'"]/*[local-name() != "capabilities" and local-name() != "aclCapability" and namespace-uri() = "'
.CMIS_NS.
'"]'
);
our
$CMIS_XPATH_CAPABILITIES
= new XML::LibXML::XPathExpression(
'./*[local-name() = "repositoryInfo" and namespace-uri() = "'
.CMISRA_NS.
'"]/*[local-name() = "capabilities" and namespace-uri() = "'
.CMIS_NS.
'"]/*'
);
our
$CMIS_XPATH_SUPPORTED_PERMISSIONS
= new XML::LibXML::XPathExpression(
'./*[local-name() = "repositoryInfo" and namespace-uri() = "'
.CMISRA_NS.
'"]/*[local-name() = "aclCapability" and namespace-uri() = "'
.CMIS_NS.
'"]/*[local-name() = "supportedPermissions" and namespace-uri() = "'
.CMIS_NS.
'"]'
);
our
$CMIS_XPATH_PROPAGATION
= new XML::LibXML::XPathExpression(
'./*[local-name() = "repositoryInfo" and namespace-uri() = "'
.CMISRA_NS.
'"]/*[local-name() = "aclCapability" and namespace-uri() = "'
.CMIS_NS.
'"]/*[local-name() = "propagation" and namespace-uri() = "'
.CMIS_NS.
'"]'
);
our
$CMIS_XPATH_PERMISSION_DEFINITION
= new XML::LibXML::XPathExpression(
'./*[local-name() = "repositoryInfo" and namespace-uri() = "'
.CMISRA_NS.
'"]/*[local-name() = "aclCapability" and namespace-uri() = "'
.CMIS_NS.
'"]/*[local-name() = "permissions" and namespace-uri() = "'
.CMIS_NS.
'"]'
);
our
$CMIS_XPATH_PERMISSION_MAP
= new XML::LibXML::XPathExpression(
'./*[local-name() = "repositoryInfo" and namespace-uri() = "'
.CMISRA_NS.
'"]/*[local-name() = "aclCapability" and namespace-uri() = "'
.CMIS_NS.
'"]/*[local-name() = "mapping" and namespace-uri() = "'
.CMIS_NS.
'"]'
);
our
$CMIS_XPATH_URITEMPLATE
= new XML::LibXML::XPathExpression(
'./*[local-name() = "uritemplate" and namespace-uri() = "'
.CMISRA_NS.
'"]'
);
our
$CMIS_XPATH_COLLECTION
= new XML::LibXML::XPathExpression(
'./*[local-name() = "collection" and namespace-uri()="'
.APP_NS.
'" and @href]'
);
Hide Show 11 lines of Pod
sub
new {
my
(
$class
,
$client
,
$xmlDoc
) =
@_
;
my
$this
=
bless
({
client
=>
$client
,
xmlDoc
=>
$xmlDoc
,
},
$class
);
$this
->_initData;
return
$this
;
}
Hide Show 6 lines of Pod
sub
getClient {
return
$_
[0]->{client};
}
sub
_initData {
my
$this
=
shift
;
$this
->{repositoryInfo} =
undef
;
$this
->{capabilities} =
undef
;
$this
->{uriTemplates} =
undef
;
$this
->{permDefs} =
undef
;
$this
->{permMap} =
undef
;
$this
->{permissions} =
undef
;
$this
->{propagation} =
undef
;
$this
->{uriTempaltes} =
undef
;
$this
->{collectionLink} =
undef
;
$this
->{typeDefs} =
undef
;
}
sub
DESTROY {
my
$this
=
shift
;
undef
$this
->{repositoryInfo};
undef
$this
->{capabilities};
undef
$this
->{uriTemplates};
undef
$this
->{permDefs};
undef
$this
->{permMap};
undef
$this
->{permissions};
undef
$this
->{propagation};
undef
$this
->{uriTempaltes};
undef
$this
->{collectionLink};
undef
$this
->{typeDefs};
undef
$this
->{xmlDoc};
undef
$this
->{client};
undef
$this
->{fileMage};
}
Hide Show 6 lines of Pod
sub
toString {
my
$this
=
shift
;
return
$this
->getRepositoryId;
}
Hide Show 7 lines of Pod
sub
reload {
my
$this
=
shift
;
$this
->{xmlDoc} =
$this
->{client}->get;
$this
->_initData;
}
sub
_xmlDoc {
$_
[0]->reload
unless
defined
$_
[0]->{xmlDoc};
return
$_
[0]->{xmlDoc};
}
Hide Show 6 lines of Pod
sub
getRepositoryId {
return
$_
[0]->getRepositoryInfo->{repositoryId};
}
Hide Show 6 lines of Pod
sub
getRepositoryName {
return
$_
[0]->getRepositoryInfo->{repositoryName};
}
Hide Show 8 lines of Pod
sub
getRepositoryInfo {
my
$this
=
shift
;
unless
(
defined
$this
->{repositoryInfo}) {
$this
->{repositoryInfo}{
$_
->localname} =
$_
->string_value
foreach
$this
->_xmlDoc->findnodes(
$CMIS_XPATH_REPOSITORYINFO
);
}
return
$this
->{repositoryInfo};
}
Hide Show 6 lines of Pod
sub
getCapabilities {
my
$this
=
shift
;
unless
(
defined
$this
->{capabilities}) {
$this
->{capabilities} = {};
foreach
my
$node
(
$this
->_xmlDoc->findnodes(
$CMIS_XPATH_CAPABILITIES
)) {
my
$key
=
$node
->localname;
$key
=~ s/^capability//;
my
$val
=
$node
->string_value;
$val
= WebService::Cmis::Property::Boolean->parse(
$val
)
if
$val
=~ /^(true|false)$/;
$this
->{capabilities}{
$key
} =
$val
;
}
}
return
$this
->{capabilities};
}
Hide Show 11 lines of Pod
sub
getSupportedPermissions {
my
$this
=
shift
;
unless
(
$this
->getCapabilities()->{
'ACL'
}) {
throw WebService::Cmis::NotSupportedException(
"This repository does not support ACLs"
);
}
unless
(
defined
$this
->{permissions}) {
$this
->{permissions} =
$this
->_xmlDoc->findvalue(
$CMIS_XPATH_SUPPORTED_PERMISSIONS
);
}
return
$this
->{permissions};
}
Hide Show 12 lines of Pod
sub
getPropagation {
my
$this
=
shift
;
unless
(
$this
->getCapabilities()->{
'ACL'
}) {
throw WebService::Cmis::NotSupportedException(
"This repository does not support ACLs"
);
}
unless
(
defined
$this
->{propagation}) {
$this
->{propagation} =
$this
->_xmlDoc->findvalue(
$CMIS_XPATH_PROPAGATION
);
}
return
$this
->{propagation};
}
Hide Show 8 lines of Pod
sub
getPermissionDefinitions {
my
$this
=
shift
;
unless
(
$this
->getCapabilities()->{
'ACL'
}) {
throw WebService::Cmis::NotSupportedException(
"This repository does not support ACLs"
);
}
unless
(
defined
$this
->{permDefs}) {
foreach
my
$node
(
$this
->_xmlDoc->findnodes(
$CMIS_XPATH_PERMISSION_DEFINITION
)) {
my
(
$permNode
) =
$node
->getElementsByTagNameNS(CMIS_NS,
'permission'
);
my
(
$descNode
) =
$node
->getElementsByTagNameNS(CMIS_NS,
'description'
);
if
(
defined
$permNode
&&
defined
$descNode
) {
$this
->{permDefs}{
$permNode
->string_value} =
$descNode
->string_value;
}
else
{
}
}
}
return
$this
->{permDefs};
}
Hide Show 8 lines of Pod
sub
getPermissionMap {
my
$this
=
shift
;
unless
(
$this
->getCapabilities()->{
'ACL'
}) {
throw WebService::Cmis::NotSupportedException(
"This repository does not support ACLs"
);
}
unless
(
defined
$this
->{permMap}) {
foreach
my
$node
(
$this
->_xmlDoc->findnodes(
$CMIS_XPATH_PERMISSION_MAP
)) {
my
@permList
= ();
my
(
$keyNode
) =
$node
->getElementsByTagNameNS(CMIS_NS,
'key'
);
foreach
my
$permNode
(
$node
->getElementsByTagNameNS(CMIS_NS,
'permission'
)) {
push
@permList
,
$permNode
->string_value;
}
$this
->{permMap}{
$keyNode
->string_value} = \
@permList
;
}
}
return
$this
->{permMap}
}
Hide Show 6 lines of Pod
sub
getUriTemplates {
my
$this
=
shift
;
unless
(
defined
$this
->{uriTemplates}) {
foreach
my
$node
(
$this
->_xmlDoc->findnodes(
$CMIS_XPATH_URITEMPLATE
)) {
my
$template
;
my
$type
;
my
$mediaType
;
foreach
my
$subNode
(
$node
->childNodes) {
next
if
$subNode
->nodeType != XML_ELEMENT_NODE;
my
$localName
=
$subNode
->localname;
if
(
$localName
eq
'template'
) {
$template
=
$subNode
->string_value;
}
elsif
(
$localName
eq
'type'
) {
$type
=
$subNode
->string_value;
}
elsif
(
$localName
eq
'mediatype'
) {
$mediaType
=
$subNode
->string_value;
}
last
if
defined
$template
&&
defined
$type
&&
defined
$mediaType
;
}
$this
->{uriTemplates}{
$type
} = {
template
=>
$template
,
type
=>
$type
,
mediatype
=>
$mediaType
,
};
}
}
return
$this
->{uriTemplates};
}
Hide Show 6 lines of Pod
sub
getUriTemplate {
my
(
$this
,
$type
) =
@_
;
return
$this
->getUriTemplates()->{
$type
}->{template};
}
Hide Show 6 lines of Pod
sub
getRootFolder {
my
$this
=
shift
;
my
$id
=
$this
->getRepositoryInfo->{
'rootFolderId'
};
return
$this
->getFolder(
$id
)
if
$id
;
return
$this
->getObjectByPath(
"/"
);
}
Hide Show 6 lines of Pod
sub
getFolder {
my
(
$this
,
$id
) =
@_
;
return
new WebService::Cmis::Folder(
repository
=>
$this
,
id
=>
$id
);
}
Hide Show 9 lines of Pod
sub
getCollection {
my
$this
=
shift
;
my
$collectionType
=
shift
;
if
(
$collectionType
eq QUERY_COLL) {
throw Error::Simple(
"query collection not supported"
);
}
my
$result
=
$this
->{client}->get(
$this
->getCollectionLink(
$collectionType
),
@_
);
if
(
$collectionType
eq TYPES_COLL) {
return
new WebService::Cmis::AtomFeed::ObjectTypes(
repository
=>
$this
,
xmlDoc
=>
$result
);
}
else
{
return
new WebService::Cmis::AtomFeed::Objects(
repository
=>
$this
,
xmlDoc
=>
$result
);
}
}
Hide Show 10 lines of Pod
sub
getTypeDefinition {
my
(
$this
,
$id
) =
@_
;
my
$objectType
= new WebService::Cmis::ObjectType(
repository
=>
$this
,
id
=>
$id
);
$objectType
->reload;
return
$objectType
;
}
Hide Show 7 lines of Pod
sub
getCollectionLink {
my
(
$this
,
$collectionType
) =
@_
;
unless
(
$this
->{collectionLink}) {
foreach
my
$node
(
$this
->_xmlDoc->findnodes(
$CMIS_XPATH_COLLECTION
)) {
my
$href
=
$node
->attributes->getNamedItem(
'href'
)->value;
foreach
my
$subNode
(
$node
->childNodes) {
next
unless
$subNode
->nodeType == XML_ELEMENT_NODE &&
$subNode
->localname eq
'collectionType'
;
$this
->{collectionLink}{
$subNode
->string_value} =
$href
;
}
}
}
return
$this
->{collectionLink}{
$collectionType
};
}
Hide Show 7 lines of Pod
sub
getLink {
my
(
$this
,
$relation
) =
@_
;
my
$href
=
$this
->_xmlDoc->find(
'./*[local-name() = "link" and namespace-uri() = "'
.ATOM_NS.
'" and @rel="'
.
$relation
.
'"]/@href'
);
return
""
.
$href
if
$href
;
return
;
}
Hide Show 29 lines of Pod
sub
getObjectByPath {
my
$this
=
shift
;
my
$path
=
shift
;
my
%params
=
@_
;
my
$template
=
$this
->getUriTemplate(
'objectbypath'
);
$path
||=
'/'
;
$template
=~ s/{path}/
delete
$params
{path}||
$path
/ge;
$template
=~ s/{filter}/
delete
$params
{filter}||
''
/ge;
$template
=~ s/{includeAllowableActions}/WebService::Cmis::Property::Boolean->unparse(
delete
$params
{includeAllowableActions}||
'false'
)/ge;
$template
=~ s/{includePolicyIds}/WebService::Cmis::Property::Boolean->unparse(
delete
$params
{includePolicyIds}||
'false'
)/ge;
$template
=~ s/{includeRelationships}/WebService::Cmis::Property::Boolean->unparse(
delete
$params
{includeRelationships}||
''
)/ge;
$template
=~ s/{includeACL}/WebService::Cmis::Property::Boolean->unparse(
delete
$params
{includeACL}||
'false'
)/ge;
$template
=~ s/{renditionFilter}/
delete
$params
{renditionFilter}||
''
/ge;
my
$result
;
try
{
$result
=
$this
->{client}->get(
$template
,
@_
);
}
catch
WebService::Cmis::ClientException
with
{
};
return
unless
$result
;
return
new WebService::Cmis::Object(
repository
=>
$this
,
xmlDoc
=>
$result
,
extra_params
=>\
%params
);
}
Hide Show 8 lines of Pod
sub
getObject {
my
$this
=
shift
;
my
$id
=
shift
;
my
%params
=
@_
;
my
$obj
;
try
{
$obj
= new WebService::Cmis::Object(
repository
=>
$this
,
id
=>
$id
,
extra_params
=>\
%params
);
}
catch
WebService::Cmis::ClientException
with
{
};
return
$obj
;
}
Hide Show 31 lines of Pod
sub
getCheckedOutDocs {
my
$this
=
shift
;
return
$this
->getCollection(CHECKED_OUT_COLL,
@_
)
}
Hide Show 29 lines of Pod
sub
getUnfiledDocs {
my
$this
=
shift
;
return
$this
->getCollection(UNFILED_COLL,
@_
);
}
Hide Show 9 lines of Pod
sub
getTypeDefinitions {
my
$this
=
shift
;
return
$this
->getCollection(TYPES_COLL,
@_
);
}
Hide Show 6 lines of Pod
sub
createEmptyXmlDoc {
my
$this
=
shift
;
my
$xmlDoc
= new XML::LibXML::Document(
'1.0'
,
'UTF-8'
);
my
$entryElement
=
$xmlDoc
->createElementNS(ATOM_NS,
"entry"
);
$xmlDoc
->setDocumentElement(
$entryElement
);
return
$xmlDoc
;
}
Hide Show 14 lines of Pod
sub
createEntryXmlDoc {
my
$this
=
shift
;
my
%params
=
@_
;
my
$xmlDoc
= new XML::LibXML::Document(
'1.0'
,
'UTF-8'
);
my
$entryElement
=
$xmlDoc
->createElementNS(ATOM_NS,
"entry"
);
$entryElement
->addChild(
$xmlDoc
->createAttribute(
'xmlns:app'
, APP_NS));
$entryElement
->addChild(
$xmlDoc
->createAttribute(
'xmlns:app'
, APP_NS));
$entryElement
->addChild(
$xmlDoc
->createAttribute(
'xmlns:cmisra'
, CMISRA_NS));
$xmlDoc
->setDocumentElement(
$entryElement
);
if
(
defined
$params
{summary}) {
my
$summaryElement
=
$entryElement
->addNewChild(ATOM_NS,
"summary"
);
$summaryElement
->addChild(
$xmlDoc
->createTextNode(
$params
{summary}));
}
my
$contentFile
=
$params
{contentFile};
my
$contentData
=
$params
{contentData};
if
(
defined
$contentFile
||
defined
$contentData
) {
my
$mimeType
=
$params
{contentType};
unless
(
defined
$contentData
) {
my
$fh
;
open
(
$fh
,
'<'
,
$contentFile
)
or throw Error::Simple(
"can't open file $contentFile"
);
local
$/ =
undef
;
$contentData
= <
$fh
>;
close
(
$fh
);
$contentData
=
''
unless
$contentData
;
}
unless
(
defined
$mimeType
) {
unless
(
defined
$this
->{fileMage}) {
$this
->{fileMage} = new File::MMagic;
}
$mimeType
=
$this
->{fileMage}->checktype_contents(
$contentData
);
$mimeType
=
'application/binary'
unless
defined
$mimeType
;
}
$contentData
= MIME::Base64::encode_base64(
$contentData
);
my
$contentElement
=
$xmlDoc
->createElementNS(CMISRA_NS,
'cmisra:content'
);
$entryElement
->appendChild(
$contentElement
);
my
$mediaElement
=
$xmlDoc
->createElementNS(CMISRA_NS,
'cmisra:mediatype'
);
$contentElement
->appendChild(
$mediaElement
);
$mediaElement
->addChild(
$xmlDoc
->createTextNode(
$mimeType
));
my
$base64Element
=
$xmlDoc
->createElementNS(CMISRA_NS,
'cmisra:base64'
);
$contentElement
->appendChild(
$base64Element
);
$base64Element
->addChild(
$xmlDoc
->createTextNode(
$contentData
));
}
my
$objectElement
=
$entryElement
->addNewChild(CMISRA_NS,
'cmisra:object'
);
$objectElement
->addChild(
$xmlDoc
->createAttribute(
'xmlns:cmis'
, CMIS_NS));
if
(
defined
$params
{properties}) {
my
$propsElement
=
$objectElement
->addNewChild(CMIS_NS,
'cmis:properties'
);
foreach
my
$property
(@{
$params
{properties}}) {
if
(
$property
->getId eq
'cmis:name'
) {
writeCmisDebug(
"got cmis:name property"
);
my
$titleElement
=
$entryElement
->addNewChild(ATOM_NS,
"title"
);
$titleElement
->addChild(
$xmlDoc
->createTextNode(
$property
->getValue));
}
$propsElement
->appendChild(
$property
->toXml(
$xmlDoc
));
}
}
if
(
defined
$params
{folder}) {
my
$folderElement
=
$objectElement
->addNewChild(CMIS_NS,
'cmis:folderId'
);
$folderElement
->addChild(
$xmlDoc
->createTextNode(
$params
{folder}->getId));
}
my
$repositoryIdElement
=
$objectElement
->addNewChild(CMIS_NS,
'cmis:repositoryId'
);
$repositoryIdElement
->addChild(
$xmlDoc
->createTextNode(
$this
->getRepositoryId));
return
$xmlDoc
;
}
Hide Show 12 lines of Pod
sub
createObject {
my
$this
=
shift
;
my
$parentFolder
=
shift
;
my
$postUrl
;
if
(
defined
$parentFolder
) {
$postUrl
=
$parentFolder
->getChildrenLink;
}
else
{
unless
(
$this
->getCapabilities->{
'Unfiling'
}) {
throw WebService::Cmis::NotSupportedException(
"This repository does not support unfiling"
);
}
$postUrl
=
$this
->getCollectionLink(UNFILED_COLL);
}
my
$xmlDoc
=
$this
->createEntryXmlDoc(
folder
=>
$parentFolder
,
@_
);
my
$result
=
$this
->{client}->post(
$postUrl
,
$xmlDoc
->toString, ATOM_XML_ENTRY_TYPE);
return
new WebService::Cmis::Object(
repository
=>
$this
,
xmlDoc
=>
$result
);
}
Hide Show 24 lines of Pod
sub
getTypeChildren {
my
$this
=
shift
;
my
$typeId
=
shift
;
if
(
defined
$typeId
) {
my
$targetType
=
$this
->getTypeDefinition(
$typeId
);
my
$childrenUrl
=
$targetType
->getLink(DOWN_REL, ATOM_XML_FEED_TYPE_P);
my
$result
=
$this
->{client}->get(
$childrenUrl
,
@_
);
return
new WebService::Cmis::AtomFeed::ObjectTypes(
repository
=>
$this
,
xmlDoc
=>
$result
);
}
else
{
return
$this
->getTypeDefinitions;
}
}
Hide Show 22 lines of Pod
sub
getTypeDescendants {
my
$this
=
shift
;
my
$typeId
=
shift
;
my
$descendUrl
;
if
(
defined
$typeId
) {
my
$targetType
=
$this
->getTypeDefinition(
$typeId
);
$descendUrl
=
$targetType
->getLink(DOWN_REL, CMIS_TREE_TYPE_P);
}
else
{
$descendUrl
=
$this
->getLink(TYPE_DESCENDANTS_REL);
}
unless
(
defined
$descendUrl
) {
throw Error::Simple(
"Could not determine the type descendants URL"
);
}
my
$result
=
$this
->{client}->get(
$descendUrl
,
@_
);
return
new WebService::Cmis::AtomFeed::ObjectTypes(
repository
=>
$this
,
xmlDoc
=>
$result
);
}
Hide Show 38 lines of Pod
sub
query {
my
$this
=
shift
;
my
$statement
=
shift
;
my
$queryUrl
=
$this
->getCollectionLink(QUERY_COLL);
my
$xmlDoc
=
$this
->_getQueryXmlDoc(
$statement
,
@_
);
my
$result
=
$this
->{client}->post(
$queryUrl
,
$xmlDoc
->toString, CMIS_QUERY_TYPE);
return
new WebService::Cmis::AtomFeed::Objects(
repository
=>
$this
,
xmlDoc
=>
$result
);
}
sub
_getQueryXmlDoc {
my
$this
=
shift
;
my
$statement
=
shift
;
my
%params
=
@_
;
my
$xmlDoc
= new XML::LibXML::Document(
'1.0'
,
'UTF-8'
);
my
$queryElement
=
$xmlDoc
->createElementNS(CMIS_NS,
"query"
);
$xmlDoc
->setDocumentElement(
$queryElement
);
my
$statementElement
=
$xmlDoc
->createElementNS(CMIS_NS,
"statement"
);
$statementElement
->addChild(
$xmlDoc
->createCDATASection(
$statement
));
$queryElement
->appendChild(
$statementElement
);
foreach
my
$key
(
keys
%params
) {
my
$optionElement
=
$xmlDoc
->createElementNS(CMIS_NS,
$key
);
$optionElement
->addChild(
$xmlDoc
->createTextNode(
$params
{
$key
}));
$queryElement
->appendChild(
$optionElement
);
}
return
$xmlDoc
;
}
Hide Show 27 lines of Pod
sub
getContentChanges {
my
$this
=
shift
;
unless
(
$this
->getCapabilities()->{
'ACL'
}) {
throw WebService::Cmis::NotSupportedException(
"This repository does not support change logs"
);
}
my
$changesUrl
=
$this
->getLink(CHANGE_LOG_REL);
my
$result
=
$this
->{client}->get(
$changesUrl
,
@_
);
return
new WebService::Cmis::AtomFeed::ChangeEntries(
repository
=>
$this
,
xmlDoc
=>
$result
);
}
Hide Show 21 lines of Pod
sub
createDocument {
my
$this
=
shift
;
my
$name
=
shift
;
my
%params
=
@_
;
my
$parentFolder
=
delete
$params
{folder};
my
$properties
=
delete
$params
{properties};
$properties
= []
unless
defined
$properties
;
push
@$properties
, WebService::Cmis::Property::newString(
id
=>
'cmis:name'
,
value
=>
$name
,
);
my
$foundObjectTypeId
= 0;
foreach
my
$prop
(
@$properties
) {
if
(
$prop
->getId eq
'cmis:objectTypeId'
) {
$foundObjectTypeId
= 1;
last
;
}
}
unless
(
$foundObjectTypeId
) {
push
@$properties
, WebService::Cmis::Property::newId(
id
=>
'cmis:objectTypeId'
,
value
=>
'cmis:document'
,
);
}
return
$this
->createObject(
$parentFolder
,
properties
=>
$properties
,
%params
,
);
}
Hide Show 26 lines of Pod
sub
createFolder {
my
$this
=
shift
;
my
$name
=
shift
;
my
%params
=
@_
;
my
$parentFolder
=
delete
$params
{folder};
my
$properties
=
delete
$params
{properties};
$properties
= []
unless
defined
$properties
;
push
@$properties
,
WebService::Cmis::Property::newString(
id
=>
'cmis:name'
,
value
=>
$name
,
);
my
$foundObjectTypeId
= 0;
foreach
my
$prop
(
@$properties
) {
if
(
$prop
->getId eq
'cmis:objectTypeId'
) {
$foundObjectTypeId
= 1;
last
;
}
}
unless
(
$foundObjectTypeId
) {
push
@$properties
,
WebService::Cmis::Property::newId(
id
=>
'cmis:objectTypeId'
,
value
=>
'cmis:folder'
,
);
}
return
$this
->createObject(
$parentFolder
,
properties
=>
$properties
,
%params
,
);
}
Hide Show 6 lines of Pod
sub
createRelationship { throw WebService::Cmis::NotImplementedException; }
Hide Show 6 lines of Pod
sub
createPolicy { throw WebService::Cmis::NotImplementedException; }
Hide Show 15 lines of Pod
1;