@@ 701-710 (lines=10) @@ | ||
698 | * @return ObjectTypeInterface the new type definition |
|
699 | * @throws CmisNotSupportedException If repository version 1.0 |
|
700 | */ |
|
701 | public function createType(TypeDefinitionInterface $type) |
|
702 | { |
|
703 | if ($this->getRepositoryInfo()->getCmisVersion() == CmisVersion::cast(CmisVersion::CMIS_1_0)) { |
|
704 | throw new CmisNotSupportedException('This method is not supported for CMIS 1.0 repositories.'); |
|
705 | } |
|
706 | ||
707 | return $this->convertTypeDefinition( |
|
708 | $this->getBinding()->getRepositoryService()->createType($this->getRepositoryInfo()->getId(), $type) |
|
709 | ); |
|
710 | } |
|
711 | ||
712 | /** |
|
713 | * Deletes an object and, if it is a document, all versions in the version series. |
|
@@ 735-743 (lines=9) @@ | ||
732 | * @param string $typeId the ID of the type to delete |
|
733 | * @throws CmisNotSupportedException If repository version 1.0 |
|
734 | */ |
|
735 | public function deleteType($typeId) |
|
736 | { |
|
737 | if ($this->getRepositoryInfo()->getCmisVersion() == CmisVersion::cast(CmisVersion::CMIS_1_0)) { |
|
738 | throw new CmisNotSupportedException('This method is not supported for CMIS 1.0 repositories.'); |
|
739 | } |
|
740 | ||
741 | $this->getBinding()->getRepositoryService()->deleteType($this->getRepositoryId(), $typeId); |
|
742 | $this->removeObjectFromCache($this->createObjectId($typeId)); |
|
743 | } |
|
744 | ||
745 | /** |
|
746 | * Fetches the ACL of an object from the repository. |