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

#include <webdavcontent.hxx>

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

Public Member Functions

 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, rtl::Reference< DAVSessionFactory > const &rSessionFactory)
 
 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, rtl::Reference< DAVSessionFactory > const &rSessionFactory, bool isCollection)
 
virtual ~Content () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () override throw ()
 
virtual void SAL_CALL release () override throw ()
 
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 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 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
 
DAVResourceAccessgetResourceAccess ()
 
- Public Member Functions inherited from ucbhelper::ContentImplHelper
 ContentImplHelper (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const rtl::Reference< ContentProviderImplHelper > &rxProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
 
virtual ~ContentImplHelper () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
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 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 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 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
 

Static Public Member Functions

static css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Reference< css::uno::XComponentContext > &rContext, const css::uno::Sequence< css::beans::Property > &rProperties, const ContentProperties &rData, const rtl::Reference< ::ucbhelper::ContentProviderImplHelper > &rProvider, const OUString &rContentId)
 

Private Types

enum  ResourceType {
  UNKNOWN,
  NON_DAV,
  DAV
}
 
typedef rtl::Reference< ContentContentRef
 
typedef std::vector< ContentRefContentRefList
 

Private Member Functions

virtual css::uno::Sequence< css::beans::Property > getProperties (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
 
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
 
virtual OUString getParentURL () override
 
bool isFolder (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Sequence< css::beans::Property > &rProperties, 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)
 
void queryChildren (ContentRefList &rChildren)
 
bool exchangeIdentity (const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
 
const OUString getBaseURI (const std::unique_ptr< DAVResourceAccess > &rResAccess)
 
ResourceType getResourceType (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
ResourceType getResourceType (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, const std::unique_ptr< DAVResourceAccess > &rResAccess, bool *networkAccessAllowed=nullptr)
 
css::uno::Any open (const css::ucb::OpenCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void post (const css::ucb::PostCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void insert (const css::uno::Reference< css::io::XInputStream > &xInputStream, bool bReplaceExisting, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 
void transfer (const css::ucb::TransferInfo &rArgs, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 
void destroy (bool bDeletePhysical)
 
void lock (const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 
void unlock (const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 
css::uno::Any MapDAVException (const DAVException &e, bool bWrite)
 
void cancelCommandExecution (const DAVException &e, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, bool bWrite=false)
 
bool supportsExclusiveWriteLock (const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 
void addProperty (const css::ucb::PropertyCommandArgument &aCmdArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 
void removeProperty (const OUString &Name, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 

Static Private Member Functions

static bool shouldAccessNetworkAfterException (const DAVException &e)
 

Private Attributes

std::unique_ptr< DAVResourceAccessm_xResAccess
 
std::unique_ptr< CachableContentPropertiesm_xCachedProps
 
OUString m_aEscapedTitle
 
ResourceType m_eResourceType
 
ContentProviderm_pProvider
 
bool m_bTransient
 
bool m_bLocked
 
bool m_bCollection
 
bool m_bDidGetOrHead
 
std::vector< OUString > m_aFailedPropNames
 

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 65 of file webdavcontent.hxx.

Member Typedef Documentation

Definition at line 106 of file webdavcontent.hxx.

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

Definition at line 107 of file webdavcontent.hxx.

Member Enumeration Documentation

Enumerator
UNKNOWN 
NON_DAV 
DAV 

Definition at line 68 of file webdavcontent.hxx.

Constructor & Destructor Documentation

http_dav_ucp::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
rtl::Reference< DAVSessionFactory > const &  rSessionFactory 
)
Exceptions
css::ucb::ContentCreationException
http_dav_ucp::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
rtl::Reference< DAVSessionFactory > const &  rSessionFactory,
bool  isCollection 
)
Exceptions
css::ucb::ContentCreationException
Content::~Content ( )
overridevirtual

Definition at line 254 of file webdavcontent.cxx.

Member Function Documentation

void SAL_CALL Content::abort ( sal_Int32  CommandId)
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 759 of file webdavcontent.cxx.

References m_aMutex.

void SAL_CALL Content::acquire ( )
throw (
)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 265 of file webdavcontent.cxx.

void http_dav_ucp::Content::addProperty ( const css::ucb::PropertyCommandArgument &  aCmdArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
private
Exceptions
css::beans::PropertyExistException
css::beans::IllegalTypeException
css::lang::IllegalArgumentException
css::uno::RuntimeException
virtual void SAL_CALL http_dav_ucp::Content::addProperty ( const OUString &  Name,
sal_Int16  Attributes,
const css::uno::Any &  DefaultValue 
)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

void http_dav_ucp::Content::cancelCommandExecution ( const DAVException e,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv,
bool  bWrite = false 
)
private
Exceptions
css::uno::Exception
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL http_dav_ucp::Content::createNewContent ( const css::ucb::ContentInfo &  Info)
overridevirtual
void Content::destroy ( bool  bDeletePhysical)
private
Exceptions
css::uno::Exception

Definition at line 2760 of file webdavcontent.cxx.

References m_aMutex.

bool http_dav_ucp::Content::exchangeIdentity ( const css::uno::Reference< css::ucb::XContentIdentifier > &  xNewId)
private
virtual css::uno::Any SAL_CALL http_dav_ucp::Content::execute ( const css::ucb::Command &  aCommand,
sal_Int32  CommandId,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
overridevirtual
const OUString Content::getBaseURI ( const std::unique_ptr< DAVResourceAccess > &  rResAccess)
private

Definition at line 3169 of file webdavcontent.cxx.

References m_aMutex.

virtual css::uno::Sequence< css::ucb::CommandInfo > http_dav_ucp::Content::getCommands ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overrideprivatevirtual
OUString SAL_CALL Content::getContentType ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 407 of file webdavcontent.cxx.

References WEBDAV_COLLECTION_TYPE, and WEBDAV_CONTENT_TYPE.

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

Reimplemented from ucbhelper::ContentImplHelper.

OUString SAL_CALL Content::getImplementationName ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 389 of file webdavcontent.cxx.

OUString Content::getParentURL ( )
overrideprivatevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1131 of file webdavcontent.cxx.

References nPos.

virtual css::uno::Sequence< css::beans::Property > http_dav_ucp::Content::getProperties ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overrideprivatevirtual
css::uno::Reference< css::sdbc::XRow > http_dav_ucp::Content::getPropertyValues ( const css::uno::Sequence< css::beans::Property > &  rProperties,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception

Referenced by http_dav_ucp::DataSupplier::queryPropertyValues().

static css::uno::Reference< css::sdbc::XRow > http_dav_ucp::Content::getPropertyValues ( const css::uno::Reference< css::uno::XComponentContext > &  rContext,
const css::uno::Sequence< css::beans::Property > &  rProperties,
const ContentProperties rData,
const rtl::Reference< ::ucbhelper::ContentProviderImplHelper > &  rProvider,
const OUString &  rContentId 
)
static
DAVResourceAccess& http_dav_ucp::Content::getResourceAccess ( )
inline

Definition at line 254 of file webdavcontent.hxx.

References m_xResAccess.

ResourceType http_dav_ucp::Content::getResourceType ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private
Exceptions
css::uno::Exception
ResourceType http_dav_ucp::Content::getResourceType ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv,
const std::unique_ptr< DAVResourceAccess > &  rResAccess,
bool *  networkAccessAllowed = nullptr 
)
private
Exceptions
css::uno::Exception
uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 396 of file webdavcontent.cxx.

References WEBDAV_CONTENT_SERVICE_NAME.

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

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 333 of file webdavcontent.cxx.

References CPPU_TYPE_REF, and cppu::OTypeCollection::getTypes().

void http_dav_ucp::Content::insert ( const css::uno::Reference< css::io::XInputStream > &  xInputStream,
bool  bReplaceExisting,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
private
Exceptions
css::uno::Exception
bool http_dav_ucp::Content::isFolder ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private
Exceptions
css::uno::Exception
void http_dav_ucp::Content::lock ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment)
private
Exceptions
css::uno::Exception
uno::Any Content::MapDAVException ( const DAVException e,
bool  bWrite 
)
private
css::uno::Any http_dav_ucp::Content::open ( const css::ucb::OpenCommandArgument2 &  rArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
void http_dav_ucp::Content::post ( const css::ucb::PostCommandArgument2 &  rArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
void Content::queryChildren ( ContentRefList rChildren)
private

Definition at line 2218 of file webdavcontent.cxx.

References nPos.

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

Definition at line 1046 of file webdavcontent.cxx.

References m_aMutex, WEBDAV_COLLECTION_TYPE, and WEBDAV_CONTENT_TYPE.

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

Reimplemented from ucbhelper::ContentImplHelper.

void SAL_CALL Content::release ( )
throw (
)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 273 of file webdavcontent.cxx.

void http_dav_ucp::Content::removeProperty ( const OUString &  Name,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
private
Exceptions
css::beans::PropertyExistException
css::beans::NotRemoveableException
css::uno::RuntimeException
void SAL_CALL Content::removeProperty ( const OUString &  Name)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1034 of file webdavcontent.cxx.

css::uno::Sequence< css::uno::Any > http_dav_ucp::Content::setPropertyValues ( const css::uno::Sequence< css::beans::PropertyValue > &  rValues,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
bool Content::shouldAccessNetworkAfterException ( const DAVException e)
staticprivate
bool Content::supportsExclusiveWriteLock ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment)
private

Definition at line 2782 of file webdavcontent.cxx.

void http_dav_ucp::Content::transfer ( const css::ucb::TransferInfo &  rArgs,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
private
Exceptions
css::uno::Exception
void http_dav_ucp::Content::unlock ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment)
private
Exceptions
css::uno::Exception

Member Data Documentation

OUString http_dav_ucp::Content::m_aEscapedTitle
private

Definition at line 77 of file webdavcontent.hxx.

std::vector< OUString > http_dav_ucp::Content::m_aFailedPropNames
private

Definition at line 84 of file webdavcontent.hxx.

bool http_dav_ucp::Content::m_bCollection
private

Definition at line 82 of file webdavcontent.hxx.

bool http_dav_ucp::Content::m_bDidGetOrHead
private

Definition at line 83 of file webdavcontent.hxx.

bool http_dav_ucp::Content::m_bLocked
private

Definition at line 81 of file webdavcontent.hxx.

bool http_dav_ucp::Content::m_bTransient
private

Definition at line 80 of file webdavcontent.hxx.

ResourceType http_dav_ucp::Content::m_eResourceType
private

Definition at line 78 of file webdavcontent.hxx.

ContentProvider* http_dav_ucp::Content::m_pProvider
private

Definition at line 79 of file webdavcontent.hxx.

std::unique_ptr< CachableContentProperties > http_dav_ucp::Content::m_xCachedProps
private

Definition at line 76 of file webdavcontent.hxx.

std::unique_ptr< DAVResourceAccess > http_dav_ucp::Content::m_xResAccess
private

Definition at line 75 of file webdavcontent.hxx.

Referenced by getResourceAccess().


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