Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
7586bea9
Kaydet (Commit)
7586bea9
authored
Kas 19, 2013
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add data for Alfresco Cloud CMIS connection
Change-Id: Ie5374f2e81e1429294805f05ae432fba86cc50df
üst
87bd65ef
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
76 additions
and
5 deletions
+76
-5
config_oauth2.h.in
config_host/config_oauth2.h.in
+10
-0
configure.ac
configure.ac
+44
-4
Common.xcu
officecfg/registry/data/org/openoffice/Office/Common.xcu
+2
-0
ServerDetailsControls.cxx
svtools/source/dialogs/ServerDetailsControls.cxx
+4
-1
cmis_content.cxx
ucb/source/ucp/cmis/cmis_content.cxx
+5
-0
cmis_repo_content.cxx
ucb/source/ucp/cmis/cmis_repo_content.cxx
+11
-0
No files found.
config_host/config_oauth2.h.in
Dosyayı görüntüle @
7586bea9
...
...
@@ -23,6 +23,16 @@
#define GDRIVE_REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob"
#define GDRIVE_SCOPE "https://www.googleapis.com/auth/drive"
/* Alfresco Cloud */
#define ALFRESCO_CLOUD_BASE_URL "https://api.alfresco.com/"
#define ALFRESCO_CLOUD_CLIENT_ID ""
#define ALFRESCO_CLOUD_CLIENT_SECRET ""
#define ALFRESCO_CLOUD_AUTH_URL "https://api.alfresco.com/auth/oauth/versions/2/authorize"
#define ALFRESCO_CLOUD_TOKEN_URL "https://api.alfresco.com/auth/oauth/versions/2/token"
#define ALFRESCO_CLOUD_REDIRECT_URI "http://127.0.0.1/Callback"
#define ALFRESCO_CLOUD_SCOPE "public_api"
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
configure.ac
Dosyayı görüntüle @
7586bea9
...
...
@@ -2032,19 +2032,33 @@ AC_ARG_WITH(all-tarballs,
[Download all external tarballs unconditionally]))
AC_ARG_WITH(gdrive-client-id,
AS_HELP_STRING([--with-drive-client-id],
AS_HELP_STRING([--with-
g
drive-client-id],
[Provides the client id of the application for OAuth2 authentication
on Google Drive. If either this or --with-gdrive-client-secret is
empty, the feature will be disabled]),
)
AC_ARG_WITH(gdrive-client-secret,
AS_HELP_STRING([--with-drive-client-secret],
AS_HELP_STRING([--with-
g
drive-client-secret],
[Provides the client secret of the application for OAuth2
authentication on Google Drive. If either this or
--with-gdrive-client-id is empty, the feature will be disabled]),
)
AC_ARG_WITH(alfresco-cloud-client-id,
AS_HELP_STRING([--with-alfresco-cloud-client-id],
[Provides the client id of the application for OAuth2 authentication
on Alfresco Cloud. If either this or --with-alfresco-cloud-client-secret is
empty, the feature will be disabled]),
)
AC_ARG_WITH(alfresco-cloud-client-secret,
AS_HELP_STRING([--with-alfresco-cloud-client-secret],
[Provides the client secret of the application for OAuth2
authentication on Alfresco Cloud. If either this or
--with-alfresco-cloud-client-id is empty, the feature will be disabled]),
)
dnl ===================================================================
dnl Do we want to use pre-build binary tarball for recompile
dnl ===================================================================
...
...
@@ -12314,16 +12328,42 @@ AC_SUBST(TESTINSTALLDIR)
AC_MSG_CHECKING([for Google Drive client id and secret])
GDRIVE_CLIENT_ID="\"$with_gdrive_client_id\""
GDRIVE_CLIENT_SECRET="\"$with_gdrive_client_secret\""
if test "$with_gdrive_client_id" = "no" -o -
n "$with_driver
_client_id"; then
if test "$with_gdrive_client_id" = "no" -o -
z "$with_gdrive
_client_id"; then
GDRIVE_CLIENT_ID="\"\""
fi
if test "$with_gdrive_client_secret" = "no" -o -
n "$with_driver
_client_secret"; then
if test "$with_gdrive_client_secret" = "no" -o -
z "$with_gdrive
_client_secret"; then
GDRIVE_CLIENT_SECRET="\"\""
fi
if test -z "$GDRIVE_CLIENT_ID" -o -z "$GDRIVE_CLIENT_SECRET"; then
AC_MSG_RESULT([not set])
else
AC_MSG_RESULT([set])
fi
AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_ID, $GDRIVE_CLIENT_ID)
AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_SECRET, $GDRIVE_CLIENT_SECRET)
AC_MSG_CHECKING([for Alfresco Cloud client id and secret])
ALFRESCO_CLOUD_CLIENT_ID="\"$with_alfresco_cloud_client_id\""
ALFRESCO_CLOUD_CLIENT_SECRET="\"$with_alfresco_cloud_client_secret\""
if test "$with_alfresco_cloud_client_id" = "no" -o -z "$with_alfresco_cloud_client_id"; then
ALFRESCO_CLOUD_CLIENT_ID="\"\""
fi
if test "$with_alfresco_cloud_client_secret" = "no" -o -z "$with_alfresco_cloud_client_secret"; then
ALFRESCO_CLOUD_CLIENT_SECRET="\"\""
fi
if test -z "$ALFRESCO_CLOUD_CLIENT_ID" -o -z "$ALFRESCO_CLOUD_CLIENT_SECRET"; then
AC_MSG_RESULT([not set])
else
AC_MSG_RESULT([set])
fi
AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_ID, $ALFRESCO_CLOUD_CLIENT_ID)
AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_SECRET, $ALFRESCO_CLOUD_CLIENT_SECRET)
# ===================================================================
# De- or increase default verbosity of build process
# ===================================================================
...
...
officecfg/registry/data/org/openoffice/Office/Common.xcu
Dosyayı görüntüle @
7586bea9
...
...
@@ -576,6 +576,7 @@
<prop
oor:name=
"CmisServersUrls"
>
<value>
<it>
http://
<
host
>
/alfresco/cmisws/RepositoryService?wsdl
</it>
<it>
https://api.alfresco.com/cmis/versions/1.0/atom/
</it>
<it>
http://
<
host
>
/p8cmis/wsdl
</it>
<it>
https://apps.lotuslive.com/files/basic/cmis/my/servicedoc
</it>
<it>
http://
<
host
>
/servlet/cmis/repository/_P
<
Quickr place name
>
_RMain.nsf/servicedoc
</it>
...
...
@@ -589,6 +590,7 @@
<prop
oor:name=
"CmisServersNames"
>
<value>
<it>
Alfresco 4
</it>
<it>
Alfresco Cloud
</it>
<it>
IBM FileNet P8
</it>
<it>
Lotus Live Files
</it>
<it>
Lotus Quickr Domino
</it>
...
...
svtools/source/dialogs/ServerDetailsControls.cxx
Dosyayı görüntüle @
7586bea9
...
...
@@ -281,13 +281,16 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) :
// Load the ServerType entries
bool
bSkipGDrive
=
OUString
(
GDRIVE_CLIENT_ID
).
isEmpty
()
||
OUString
(
GDRIVE_CLIENT_SECRET
).
isEmpty
();
bool
bSkipAlfresco
=
OUString
(
ALFRESCO_CLOUD_CLIENT_ID
).
isEmpty
()
||
OUString
(
ALFRESCO_CLOUD_CLIENT_SECRET
).
isEmpty
();
Sequence
<
OUString
>
aTypesUrlsList
(
officecfg
::
Office
::
Common
::
Misc
::
CmisServersUrls
::
get
(
xContext
)
);
Sequence
<
OUString
>
aTypesNamesList
(
officecfg
::
Office
::
Common
::
Misc
::
CmisServersNames
::
get
(
xContext
)
);
for
(
sal_Int32
i
=
0
;
i
<
aTypesUrlsList
.
getLength
(
)
&&
aTypesNamesList
.
getLength
(
);
++
i
)
{
OUString
sUrl
=
aTypesUrlsList
[
i
];
if
(
!
(
sUrl
==
GDRIVE_BASE_URL
&&
bSkipGDrive
)
)
if
(
!
(
sUrl
==
GDRIVE_BASE_URL
&&
bSkipGDrive
)
&&
!
(
sUrl
.
startsWith
(
ALFRESCO_CLOUD_BASE_URL
)
&&
bSkipAlfresco
)
)
{
m_pLBServerType
->
InsertEntry
(
aTypesNamesList
[
i
]
);
m_aServerTypesURLs
.
push_back
(
sUrl
);
...
...
ucb/source/ucp/cmis/cmis_content.cxx
Dosyayı görüntüle @
7586bea9
...
...
@@ -291,6 +291,11 @@ namespace cmis
GDRIVE_AUTH_URL
,
GDRIVE_TOKEN_URL
,
GDRIVE_SCOPE
,
GDRIVE_REDIRECT_URI
,
GDRIVE_CLIENT_ID
,
GDRIVE_CLIENT_SECRET
)
);
if
(
m_aURL
.
getBindingUrl
().
startsWith
(
ALFRESCO_CLOUD_BASE_URL
)
)
oauth2Data
.
reset
(
new
libcmis
::
OAuth2Data
(
ALFRESCO_CLOUD_AUTH_URL
,
ALFRESCO_CLOUD_TOKEN_URL
,
ALFRESCO_CLOUD_SCOPE
,
ALFRESCO_CLOUD_REDIRECT_URI
,
ALFRESCO_CLOUD_CLIENT_ID
,
ALFRESCO_CLOUD_CLIENT_SECRET
)
);
m_pSession
=
libcmis
::
SessionFactory
::
createSession
(
OUSTR_TO_STDSTR
(
m_aURL
.
getBindingUrl
(
)
),
...
...
ucb/source/ucp/cmis/cmis_repo_content.cxx
Dosyayı görüntüle @
7586bea9
...
...
@@ -17,6 +17,7 @@
#include <com/sun/star/ucb/XProgressHandler.hpp>
#include <comphelper/processfactory.hxx>
#include <config_oauth2.h>
#include <rtl/uri.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
#include <ucbhelper/commandenvironment.hxx>
...
...
@@ -147,6 +148,16 @@ namespace cmis
{
// Create a session to get repositories
libcmis
::
OAuth2DataPtr
oauth2Data
;
if
(
m_aURL
.
getBindingUrl
(
)
==
GDRIVE_BASE_URL
)
oauth2Data
.
reset
(
new
libcmis
::
OAuth2Data
(
GDRIVE_AUTH_URL
,
GDRIVE_TOKEN_URL
,
GDRIVE_SCOPE
,
GDRIVE_REDIRECT_URI
,
GDRIVE_CLIENT_ID
,
GDRIVE_CLIENT_SECRET
)
);
if
(
m_aURL
.
getBindingUrl
().
startsWith
(
ALFRESCO_CLOUD_BASE_URL
)
)
oauth2Data
.
reset
(
new
libcmis
::
OAuth2Data
(
ALFRESCO_CLOUD_AUTH_URL
,
ALFRESCO_CLOUD_TOKEN_URL
,
ALFRESCO_CLOUD_SCOPE
,
ALFRESCO_CLOUD_REDIRECT_URI
,
ALFRESCO_CLOUD_CLIENT_ID
,
ALFRESCO_CLOUD_CLIENT_SECRET
)
);
libcmis
::
Session
*
session
=
libcmis
::
SessionFactory
::
createSession
(
OUSTR_TO_STDSTR
(
m_aURL
.
getBindingUrl
(
)
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment