LibreOffice Module ucb (master)
1
|
#include <webdavcontent.hxx>
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 |
DAVResourceAccess & | getResourceAccess () |
void | getResourceOptions (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, DAVOptions &rDAVOptions, const std::unique_ptr< DAVResourceAccess > &rResAccess, bool *networkAccessAllowed=nullptr) |
![]() | |
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 > &rxContext, const css::uno::Sequence< css::beans::Property > &rProperties, const ContentProperties &rData, const rtl::Reference< ::ucbhelper::ContentProviderImplHelper > &rProvider, const OUString &rContentId) |
static bool | isResourceAvailable (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, const std::unique_ptr< DAVResourceAccess > &rResAccess, DAVOptions &rDAVOptions) |
static void | removeCachedPropertyNames (const OUString &rURL) |
Private Types | |
enum | ResourceType { UNKNOWN, NOT_FOUND, FTP, NON_DAV, DAV, DAV_NOLOCK } |
typedef rtl::Reference< Content > | ContentRef |
typedef std::vector< ContentRef > | ContentRefList |
Private Member Functions | |
void | initOptsCacheLifeTime () |
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) |
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::OpenCommandArgument3 &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) |
ResourceType | resourceTypeForLocks (const css::uno::Reference< css::ucb::XCommandEnvironment > &rEnvironment, const std::unique_ptr< DAVResourceAccess > &rResAccess) |
ResourceType | resourceTypeForLocks (const css::uno::Reference< css::ucb::XCommandEnvironment > &rEnvironment) |
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< DAVResourceAccess > | m_xResAccess |
std::unique_ptr< CachableContentProperties > | m_xCachedProps |
OUString | m_aEscapedTitle |
ResourceType | m_eResourceType |
ResourceType | m_eResourceTypeForLocks |
ContentProvider * | m_pProvider |
bool | m_bTransient |
bool | m_bCollection |
bool | m_bDidGetOrHead |
std::vector< OUString > | m_aFailedPropNames |
sal_uInt32 | m_nOptsCacheLifeImplWeb |
sal_uInt32 | m_nOptsCacheLifeDAV |
sal_uInt32 | m_nOptsCacheLifeDAVLocked |
sal_uInt32 | m_nOptsCacheLifeNotImpl |
sal_uInt32 | m_nOptsCacheLifeNotFound |
Additional Inherited Members | |
![]() | |
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 () |
![]() | |
osl::Mutex | m_aMutex |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::uno::Reference< css::ucb::XContentIdentifier > | m_xIdentifier |
rtl::Reference< ContentProviderImplHelper > | m_xProvider |
sal_uInt32 | m_nCommandId |
Definition at line 73 of file neon/webdavcontent.hxx.
|
private |
Definition at line 137 of file neon/webdavcontent.hxx.
|
private |
Definition at line 138 of file neon/webdavcontent.hxx.
|
private |
Enumerator | |
---|---|
UNKNOWN | |
NOT_FOUND | |
FTP | |
NON_DAV | |
DAV | |
DAV_NOLOCK |
Definition at line 76 of file neon/webdavcontent.hxx.
webdav_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 | ||
) |
css::ucb::ContentCreationException | |
css::uno::RuntimeException |
webdav_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 | ||
) |
css::ucb::ContentCreationException | |
css::uno::RuntimeException |
|
overridevirtual |
Definition at line 273 of file neon/webdavcontent.cxx.
|
overridevirtual |
Implements ucbhelper::ContentImplHelper.
Definition at line 790 of file neon/webdavcontent.cxx.
References ucbhelper::ContentImplHelper::m_aMutex, and m_xResAccess.
|
overridevirtual |
Reimplemented from ucbhelper::ContentImplHelper.
Definition at line 282 of file neon/webdavcontent.cxx.
|
private |
css::beans::PropertyExistException | |
css::beans::IllegalTypeException | |
css::lang::IllegalArgumentException | |
css::uno::RuntimeException |
|
overridevirtual |
Reimplemented from ucbhelper::ContentImplHelper.
|
private |
css::uno::Exception |
|
overridevirtual |
|
private |
css::uno::Exception |
Definition at line 2922 of file neon/webdavcontent.cxx.
References ucbhelper::ContentImplHelper::deleted(), ucbhelper::ContentImplHelper::m_aMutex, and queryChildren().
|
private |
|
overridevirtual |
Implements ucbhelper::ContentImplHelper.
|
private |
Definition at line 3660 of file neon/webdavcontent.cxx.
References ucbhelper::ContentImplHelper::m_aMutex, and m_xCachedProps.
|
overrideprivatevirtual |
Implements ucbhelper::ContentImplHelper.
|
overridevirtual |
Implements ucbhelper::ContentImplHelper.
Definition at line 417 of file neon/webdavcontent.cxx.
References isFolder(), WEBDAV_COLLECTION_TYPE, and WEBDAV_CONTENT_TYPE.
|
overridevirtual |
Reimplemented from ucbhelper::ContentImplHelper.
|
overridevirtual |
Implements ucbhelper::ContentImplHelper.
Definition at line 400 of file neon/webdavcontent.cxx.
|
overrideprivatevirtual |
Implements ucbhelper::ContentImplHelper.
Definition at line 1150 of file neon/webdavcontent.cxx.
References ucbhelper::ContentImplHelper::m_xIdentifier, and nPos.
Referenced by MapDAVException().
|
overrideprivatevirtual |
Implements ucbhelper::ContentImplHelper.
|
private |
css::uno::Exception |
Referenced by webdav_ucp::DataSupplier::queryPropertyValues().
|
static |
|
inline |
Definition at line 290 of file neon/webdavcontent.hxx.
References m_xResAccess.
void Content::getResourceOptions | ( | const css::uno::Reference< css::ucb::XCommandEnvironment > & | xEnv, |
DAVOptions & | rDAVOptions, | ||
const std::unique_ptr< DAVResourceAccess > & | rResAccess, | ||
bool * | networkAccessAllowed = nullptr |
||
) |
css::uno::Exception |
Definition at line 3914 of file neon/webdavcontent.cxx.
References webdav_ucp::DAVOptionsCache::addDAVOptions(), webdav_ucp::DAVException::DAV_HTTP_AUTH, webdav_ucp::DAVException::DAV_HTTP_AUTHPROXY, webdav_ucp::DAVException::DAV_HTTP_CONNECT, webdav_ucp::DAVException::DAV_HTTP_ERROR, webdav_ucp::DAVException::DAV_HTTP_LOOKUP, webdav_ucp::DAVException::DAV_HTTP_REDIRECT, webdav_ucp::DAVException::DAV_HTTP_TIMEOUT, webdav_ucp::DAVException::getData(), webdav_ucp::DAVOptionsCache::getDAVOptions(), webdav_ucp::DAVException::getError(), webdav_ucp::DAVOptions::getHttpResponseStatusCode(), webdav_ucp::DAVException::getStatus(), webdav_ucp::DAVOptions::isClass1(), webdav_ucp::DAVOptions::isClass2(), webdav_ucp::DAVOptions::isClass3(), webdav_ucp::DAVOptions::isLocked(), isResourceAvailable(), m_nOptsCacheLifeDAV, m_nOptsCacheLifeDAVLocked, m_nOptsCacheLifeImplWeb, m_nOptsCacheLifeNotFound, m_nOptsCacheLifeNotImpl, ucbhelper::ContentImplHelper::m_xIdentifier, webdav_ucp::DAVOptionsCache::removeDAVOptions(), SAL_WARN, webdav_ucp::SC_BAD_REQUEST, webdav_ucp::SC_FORBIDDEN, webdav_ucp::SC_GONE, webdav_ucp::SC_INTERNAL_SERVER_ERROR, webdav_ucp::SC_METHOD_NOT_ALLOWED, webdav_ucp::SC_NOT_FOUND, webdav_ucp::SC_NOT_IMPLEMENTED, webdav_ucp::DAVOptions::setHttpResponseStatusCode(), webdav_ucp::DAVOptions::setHttpResponseStatusText(), webdav_ucp::DAVOptions::setRedirectedURL(), webdav_ucp::DAVOptions::setURL(), shouldAccessNetworkAfterException(), webdav_ucp::USC_AUTH_FAILED, webdav_ucp::USC_AUTHPROXY_FAILED, webdav_ucp::USC_CONNECTION_TIMED_OUT, and webdav_ucp::USC_LOOKUP_FAILED.
|
private |
css::uno::Exception |
|
private |
css::uno::Exception |
|
overridevirtual |
Implements ucbhelper::ContentImplHelper.
Definition at line 407 of file neon/webdavcontent.cxx.
References WEBDAV_CONTENT_SERVICE_NAME.
|
overridevirtual |
Reimplemented from ucbhelper::ContentImplHelper.
Definition at line 344 of file neon/webdavcontent.cxx.
References CPPU_TYPE_REF, cppu::OTypeCollection::getTypes(), and isFolder().
|
private |
Definition at line 3886 of file neon/webdavcontent.cxx.
References m_nOptsCacheLifeDAV, m_nOptsCacheLifeDAVLocked, m_nOptsCacheLifeImplWeb, m_nOptsCacheLifeNotFound, m_nOptsCacheLifeNotImpl, and ucbhelper::ContentImplHelper::m_xContext.
|
private |
css::uno::Exception |
|
private |
css::uno::Exception |
Referenced by getContentType(), and getTypes().
|
static |
Definition at line 4142 of file neon/webdavcontent.cxx.
References webdav_ucp::DAVException::DAV_HTTP_ERROR, webdav_ucp::DAVException::getData(), webdav_ucp::DAVException::getError(), webdav_ucp::DAVException::getStatus(), SAL_WARN, webdav_ucp::SC_METHOD_NOT_ALLOWED, webdav_ucp::SC_NOT_FOUND, webdav_ucp::SC_NOT_IMPLEMENTED, webdav_ucp::DAVOptions::setHeadAllowed(), webdav_ucp::DAVOptions::setHttpResponseStatusCode(), and webdav_ucp::DAVOptions::setHttpResponseStatusText().
Referenced by getResourceOptions().
|
private |
css::uno::Exception |
|
private |
Definition at line 3479 of file neon/webdavcontent.cxx.
References aURL, webdav_ucp::DAVException::DAV_HTTP_CONNECT, webdav_ucp::DAVException::DAV_HTTP_ERROR, webdav_ucp::DAVException::DAV_HTTP_LOOKUP, webdav_ucp::DAVException::DAV_HTTP_TIMEOUT, webdav_ucp::DAVException::DAV_INVALID_ARG, webdav_ucp::DAVException::DAV_LOCK_EXPIRED, webdav_ucp::DAVException::DAV_LOCKED, webdav_ucp::DAVException::DAV_LOCKED_SELF, webdav_ucp::DAVException::DAV_NOT_LOCKED, webdav_ucp::DAVException::getData(), webdav_ucp::DAVException::getError(), getParentURL(), webdav_ucp::DAVException::getStatus(), m_aEscapedTitle, m_bTransient, ucbhelper::ContentImplHelper::m_xIdentifier, and webdav_ucp::SC_NOT_FOUND.
|
private |
css::uno::Exception |
|
private |
css::uno::Exception |
|
private |
Definition at line 2362 of file neon/webdavcontent.cxx.
References ucbhelper::ContentImplHelper::m_xIdentifier, ucbhelper::ContentImplHelper::m_xProvider, and nPos.
Referenced by destroy().
|
overridevirtual |
Definition at line 1067 of file neon/webdavcontent.cxx.
References aSeq, webdav_ucp::ContentProvider::getProperty(), ucbhelper::ContentImplHelper::m_aMutex, m_pProvider, WEBDAV_COLLECTION_TYPE, and WEBDAV_CONTENT_TYPE.
|
overridevirtual |
Reimplemented from ucbhelper::ContentImplHelper.
|
overridevirtual |
Reimplemented from ucbhelper::ContentImplHelper.
Definition at line 290 of file neon/webdavcontent.cxx.
|
static |
Definition at line 285 of file neon/webdavcontentcaps.cxx.
References webdav_ucp::PropertyNamesCache::removeCachedPropertyNames().
|
private |
css::beans::UnknownPropertyException | |
css::beans::NotRemoveableException | |
css::uno::RuntimeException |
Referenced by removeProperty().
|
overridevirtual |
Reimplemented from ucbhelper::ContentImplHelper.
Definition at line 1055 of file neon/webdavcontent.cxx.
References removeProperty().
|
private |
|
private |
|
private |
css::uno::Exception |
|
staticprivate |
Definition at line 3637 of file neon/webdavcontent.cxx.
References webdav_ucp::DAVException::DAV_HTTP_AUTH, webdav_ucp::DAVException::DAV_HTTP_AUTHPROXY, webdav_ucp::DAVException::DAV_HTTP_CONNECT, webdav_ucp::DAVException::DAV_HTTP_LOOKUP, webdav_ucp::DAVException::DAV_HTTP_TIMEOUT, webdav_ucp::DAVException::getError(), webdav_ucp::DAVException::getStatus(), webdav_ucp::SC_GONE, and webdav_ucp::SC_NOT_FOUND.
Referenced by getResourceOptions().
|
private |
css::uno::Exception |
|
private |
css::uno::Exception |
|
private |
Definition at line 89 of file neon/webdavcontent.hxx.
Referenced by MapDAVException().
|
private |
Definition at line 98 of file neon/webdavcontent.hxx.
|
private |
Definition at line 96 of file neon/webdavcontent.hxx.
|
private |
Definition at line 97 of file neon/webdavcontent.hxx.
|
private |
Definition at line 95 of file neon/webdavcontent.hxx.
Referenced by MapDAVException().
|
private |
Definition at line 91 of file neon/webdavcontent.hxx.
|
private |
Definition at line 93 of file neon/webdavcontent.hxx.
|
private |
Definition at line 103 of file neon/webdavcontent.hxx.
Referenced by getResourceOptions(), and initOptsCacheLifeTime().
|
private |
Definition at line 105 of file neon/webdavcontent.hxx.
Referenced by getResourceOptions(), and initOptsCacheLifeTime().
|
private |
Definition at line 101 of file neon/webdavcontent.hxx.
Referenced by getResourceOptions(), and initOptsCacheLifeTime().
|
private |
Definition at line 113 of file neon/webdavcontent.hxx.
Referenced by getResourceOptions(), and initOptsCacheLifeTime().
|
private |
Definition at line 109 of file neon/webdavcontent.hxx.
Referenced by getResourceOptions(), and initOptsCacheLifeTime().
|
private |
Definition at line 94 of file neon/webdavcontent.hxx.
Referenced by queryCreatableContentsInfo().
|
private |
Definition at line 88 of file neon/webdavcontent.hxx.
Referenced by getBaseURI().
|
private |
Definition at line 86 of file neon/webdavcontent.hxx.
Referenced by abort(), and getResourceAccess().