LibreOffice Module ucb (master) 1
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
cmis::Content Class Reference

#include <cmis_content.hxx>

Inheritance diagram for cmis::Content:
[legend]
Collaboration diagram for cmis::Content:
[legend]

Public Member Functions

 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, libcmis::ObjectPtr pObject=libcmis::ObjectPtr())
 
 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, bool bIsFolder)
 
virtual ~Content () override
 
virtual css::uno::Sequence< css::beans::Property > getProperties (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
 
libcmis::ObjectPtr updateProperties (const css::uno::Any &iCmisProps, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
 
virtual OUString getParentURL () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual OUString SAL_CALL getContentType () override
 
virtual css::uno::Any SAL_CALL execute (const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
 
virtual void SAL_CALL abort (sal_Int32 CommandId) override
 
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo () override
 
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent (const css::ucb::ContentInfo &Info) override
 
css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren () override
 
libcmis::ObjectPtr const & getObject (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
- Public Member Functions inherited from ucbhelper::ContentImplHelper
 ContentImplHelper (css::uno::Reference< css::uno::XComponentContext > xContext, rtl::Reference< ContentProviderImplHelper > xProvider, css::uno::Reference< css::ucb::XContentIdentifier > Identifier)
 
virtual ~ContentImplHelper () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual OUString SAL_CALL getImplementationName () override=0
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override=0
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override
 
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier () override
 
virtual OUString SAL_CALL getContentType () override=0
 
virtual void SAL_CALL addContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
 
virtual void SAL_CALL removeContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
 
virtual sal_Int32 SAL_CALL createCommandIdentifier () override
 
virtual css::uno::Any SAL_CALL execute (const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override=0
 
virtual void SAL_CALL abort (sal_Int32 CommandId) override=0
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
 
virtual void SAL_CALL addCommandInfoChangeListener (const css::uno::Reference< css::ucb::XCommandInfoChangeListener > &Listener) override
 
virtual void SAL_CALL removeCommandInfoChangeListener (const css::uno::Reference< css::ucb::XCommandInfoChangeListener > &Listener) override
 
virtual void SAL_CALL addProperty (const OUString &Name, sal_Int16 Attributes, const css::uno::Any &DefaultValue) override
 
virtual void SAL_CALL removeProperty (const OUString &Name) override
 
virtual void SAL_CALL addPropertySetInfoChangeListener (const css::uno::Reference< css::beans::XPropertySetInfoChangeListener > &Listener) override
 
virtual void SAL_CALL removePropertySetInfoChangeListener (const css::uno::Reference< css::beans::XPropertySetInfoChangeListener > &Listener) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent () override
 
virtual void SAL_CALL setParent (const css::uno::Reference< css::uno::XInterface > &Parent) override
 
const rtl::Reference< ContentProviderImplHelper > & getProvider () const
 
- Public Member Functions inherited from cmis::ChildrenProvider
virtual ~ChildrenProvider ()
 
virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren ()=0
 

Private Types

typedef rtl::Reference< ContentContentRef
 
typedef std::vector< ContentRefContentRefList
 

Private Member Functions

bool isFolder (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void setCmisProperty (const std::string &rName, const std::string &rValue, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Any getBadArgExcept ()
 
css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Sequence< css::beans::Property > &rProperties, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
libcmis::Session * getSession (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
libcmis::ObjectTypePtr const & getObjectType (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Any open (const css::ucb::OpenCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void transfer (const css::ucb::TransferInfo &rTransferInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void insert (const css::uno::Reference< css::io::XInputStream > &xInputStream, bool bReplaceExisting, std::u16string_view rMimeType, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
OUString checkIn (const css::ucb::CheckinArgument &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
OUString checkOut (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
OUString cancelCheckOut (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Sequence< css::uno::Any > setPropertyValues (const css::uno::Sequence< css::beans::PropertyValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Sequence< css::document::CmisVersion > getAllVersions (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
bool feedSink (const css::uno::Reference< css::uno::XInterface > &aSink, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 

Static Private Member Functions

static void copyData (const css::uno::Reference< css::io::XInputStream > &xIn, const css::uno::Reference< css::io::XOutputStream > &xOut)
 

Private Attributes

ContentProviderm_pProvider
 
libcmis::Session * m_pSession
 
libcmis::ObjectPtr m_pObject
 
OUString m_sObjectPath
 
OUString m_sObjectId
 
OUString m_sURL
 
cmis::URL m_aURL
 
bool m_bTransient
 
bool m_bIsFolder
 
libcmis::ObjectTypePtr m_pObjectType
 
std::map< std::string, libcmis::PropertyPtr > m_pObjectProps
 

Additional Inherited Members

- Protected Member Functions inherited from ucbhelper::ContentImplHelper
css::uno::Reference< css::beans::XPropertySetInfo > getPropertySetInfo (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, bool bCache=true)
 
css::uno::Reference< css::ucb::XCommandInfo > getCommandInfo (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, bool bCache=true)
 
void notifyPropertiesChange (const css::uno::Sequence< css::beans::PropertyChangeEvent > &evt) const
 
void notifyPropertySetInfoChange (const css::beans::PropertySetInfoChangeEvent &evt) const
 
void notifyContentEvent (const css::ucb::ContentEvent &evt) const
 
void inserted ()
 
void deleted ()
 
bool exchange (const css::uno::Reference< css::ucb::XContentIdentifier > &rNewId)
 
css::uno::Reference< css::ucb::XPersistentPropertySet > getAdditionalPropertySet (bool bCreate)
 
bool renameAdditionalPropertySet (const OUString &rOldKey, const OUString &rNewKey)
 
bool copyAdditionalPropertySet (const OUString &rSourceKey, const OUString &rTargetKey)
 
bool removeAdditionalPropertySet ()
 
- Protected Attributes inherited from ucbhelper::ContentImplHelper
osl::Mutex m_aMutex
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::ucb::XContentIdentifier > m_xIdentifier
 
rtl::Reference< ContentProviderImplHelperm_xProvider
 
sal_uInt32 m_nCommandId
 

Detailed Description

Definition at line 62 of file cmis_content.hxx.

Member Typedef Documentation

◆ ContentRef

Definition at line 96 of file cmis_content.hxx.

◆ ContentRefList

typedef std::vector< ContentRef > cmis::Content::ContentRefList
private

Definition at line 97 of file cmis_content.hxx.

Constructor & Destructor Documentation

◆ Content() [1/2]

cmis::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
libcmis::ObjectPtr  pObject = libcmis::ObjectPtr() 
)
Exceptions
css::ucb::ContentCreationException

◆ Content() [2/2]

cmis::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
bool  bIsFolder 
)
Exceptions
css::ucb::ContentCreationException

◆ ~Content()

cmis::Content::~Content ( )
overridevirtual

Definition at line 298 of file cmis_content.cxx.

Member Function Documentation

◆ abort()

void SAL_CALL cmis::Content::abort ( sal_Int32  CommandId)
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1888 of file cmis_content.cxx.

References SAL_INFO.

◆ acquire()

void SAL_CALL cmis::Content::acquire ( )
overridevirtualnoexcept

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1709 of file cmis_content.cxx.

◆ cancelCheckOut()

OUString cmis::Content::cancelCheckOut ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private

◆ checkIn()

OUString cmis::Content::checkIn ( const css::ucb::CheckinArgument &  rArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

◆ checkOut()

OUString cmis::Content::checkOut ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private

◆ copyData()

static void cmis::Content::copyData ( const css::uno::Reference< css::io::XInputStream > &  xIn,
const css::uno::Reference< css::io::XOutputStream > &  xOut 
)
staticprivate

◆ createNewContent()

virtual css::uno::Reference< css::ucb::XContent > SAL_CALL cmis::Content::createNewContent ( const css::ucb::ContentInfo &  Info)
overridevirtual

◆ execute()

virtual css::uno::Any SAL_CALL cmis::Content::execute ( const css::ucb::Command &  aCommand,
sal_Int32  CommandId,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
overridevirtual

◆ feedSink()

bool cmis::Content::feedSink ( const css::uno::Reference< css::uno::XInterface > &  aSink,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

◆ getAllVersions()

uno::Sequence< document::CmisVersion > cmis::Content::getAllVersions ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private
Exceptions
css::uno::Exception

Definition at line 1210 of file cmis_content.cxx.

References ucbhelper::cancelCommandExecution(), i, o3tl::runtimeToOUString(), SAL_INFO, and STD_TO_OUSTR.

◆ getBadArgExcept()

uno::Any cmis::Content::getBadArgExcept ( )
private

Definition at line 597 of file cmis_content.cxx.

◆ getChildren()

std::vector< uno::Reference< ucb::XContent > > cmis::Content::getChildren ( )
overridevirtual

◆ getCommands()

virtual css::uno::Sequence< css::ucb::CommandInfo > cmis::Content::getCommands ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overridevirtual

◆ getContentType()

OUString SAL_CALL cmis::Content::getContentType ( )
overridevirtual

◆ getImplementationId()

virtual css::uno::Sequence< sal_Int8 > SAL_CALL cmis::Content::getImplementationId ( )
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

◆ getImplementationName()

OUString SAL_CALL cmis::Content::getImplementationName ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1725 of file cmis_content.cxx.

◆ getObject()

libcmis::ObjectPtr const & cmis::Content::getObject ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
Exceptions
css::uno::RuntimeException
css::ucb::CommandFailedException
libcmis::Exception

Definition at line 501 of file cmis_content.cxx.

References INetURLObject::GetMainURL(), INetURLObject::getName(), INetURLObject::LAST_SEGMENT, m_sURL, m_xContext, INetURLObject::NONE, OUSTR_TO_STDSTR, INetURLObject::removeSegment(), SAL_INFO, sName, and INetURLObject::WithCharset.

◆ getObjectType()

libcmis::ObjectTypePtr const & cmis::Content::getObjectType ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private

Definition at line 449 of file cmis_content.cxx.

References aProperties, and type.

◆ getParentURL()

OUString cmis::Content::getParentURL ( )
overridevirtual

◆ getProperties()

virtual css::uno::Sequence< css::beans::Property > cmis::Content::getProperties ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overridevirtual

◆ getPropertyValues()

css::uno::Reference< css::sdbc::XRow > cmis::Content::getPropertyValues ( const css::uno::Sequence< css::beans::Property > &  rProperties,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

◆ getSession()

libcmis::Session * cmis::Content::getSession ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private

◆ getSupportedServiceNames()

uno::Sequence< OUString > SAL_CALL cmis::Content::getSupportedServiceNames ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1730 of file cmis_content.cxx.

◆ getTypes()

uno::Sequence< uno::Type > SAL_CALL cmis::Content::getTypes ( )
overridevirtual

◆ insert()

void cmis::Content::insert ( const css::uno::Reference< css::io::XInputStream > &  xInputStream,
bool  bReplaceExisting,
std::u16string_view  rMimeType,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception

◆ isFolder()

bool cmis::Content::isFolder ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private

◆ open()

css::uno::Any cmis::Content::open ( const css::ucb::OpenCommandArgument2 &  rArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
libcmis::Exception

◆ queryCreatableContentsInfo() [1/2]

uno::Sequence< ucb::ContentInfo > SAL_CALL cmis::Content::queryCreatableContentsInfo ( )
overridevirtual

Definition at line 1894 of file cmis_content.cxx.

◆ queryCreatableContentsInfo() [2/2]

css::uno::Sequence< css::ucb::ContentInfo > cmis::Content::queryCreatableContentsInfo ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
Exceptions
css::uno::RuntimeException

◆ queryInterface()

virtual css::uno::Any SAL_CALL cmis::Content::queryInterface ( const css::uno::Type &  rType)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

◆ release()

void SAL_CALL cmis::Content::release ( )
overridevirtualnoexcept

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1714 of file cmis_content.cxx.

◆ setCmisProperty()

void cmis::Content::setCmisProperty ( const std::string &  rName,
const std::string &  rValue,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

Definition at line 2073 of file cmis_content.cxx.

References get().

◆ setPropertyValues()

css::uno::Sequence< css::uno::Any > cmis::Content::setPropertyValues ( const css::uno::Sequence< css::beans::PropertyValue > &  rValues,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

◆ transfer()

void cmis::Content::transfer ( const css::ucb::TransferInfo &  rTransferInfo,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception

◆ updateProperties()

libcmis::ObjectPtr cmis::Content::updateProperties ( const css::uno::Any &  iCmisProps,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)

Definition at line 604 of file cmis_content.cxx.

References aProperties, OUSTR_TO_STDSTR, and SAL_INFO.

Member Data Documentation

◆ m_aURL

cmis::URL cmis::Content::m_aURL
private

Definition at line 73 of file cmis_content.hxx.

◆ m_bIsFolder

bool cmis::Content::m_bIsFolder
private

Definition at line 77 of file cmis_content.hxx.

◆ m_bTransient

bool cmis::Content::m_bTransient
private

Definition at line 76 of file cmis_content.hxx.

◆ m_pObject

libcmis::ObjectPtr cmis::Content::m_pObject
private

Definition at line 69 of file cmis_content.hxx.

◆ m_pObjectProps

std::map< std::string, libcmis::PropertyPtr > cmis::Content::m_pObjectProps
private

Definition at line 79 of file cmis_content.hxx.

◆ m_pObjectType

libcmis::ObjectTypePtr cmis::Content::m_pObjectType
private

Definition at line 78 of file cmis_content.hxx.

◆ m_pProvider

ContentProvider* cmis::Content::m_pProvider
private

Definition at line 67 of file cmis_content.hxx.

◆ m_pSession

libcmis::Session* cmis::Content::m_pSession
private

Definition at line 68 of file cmis_content.hxx.

◆ m_sObjectId

OUString cmis::Content::m_sObjectId
private

Definition at line 71 of file cmis_content.hxx.

◆ m_sObjectPath

OUString cmis::Content::m_sObjectPath
private

Definition at line 70 of file cmis_content.hxx.

◆ m_sURL

OUString cmis::Content::m_sURL
private

Definition at line 72 of file cmis_content.hxx.


The documentation for this class was generated from the following files: