Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frascati
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
114
Issues
114
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frascati
frascati
Commits
1469f1c0
Commit
1469f1c0
authored
Mar 19, 2013
by
Jeremie Guillemotte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor the web resources download service. It works now with an itent based on a rest binding.
parent
2020ea1d
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
230 additions
and
61 deletions
+230
-61
frascati/frascati-studio/src/main/java/org/easysoa/codegenerator/CodeGeneratorWsdlToJSImpl.java
.../org/easysoa/codegenerator/CodeGeneratorWsdlToJSImpl.java
+1
-1
frascati/frascati-studio/src/main/java/org/easysoa/codegenerator/CodeGeneratorWsdlToJavaImpl.java
...rg/easysoa/codegenerator/CodeGeneratorWsdlToJavaImpl.java
+1
-1
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/codegenerator/RegistryCodeGeneratorWsdlToJSImpl.java
...tion/codegenerator/RegistryCodeGeneratorWsdlToJSImpl.java
+2
-2
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/codegenerator/RegistryCodeGeneratorWsdlToJavaImpl.java
...on/codegenerator/RegistryCodeGeneratorWsdlToJavaImpl.java
+2
-2
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/AbstractWebResourceDownloadService.java
...gration/resources/AbstractWebResourceDownloadService.java
+2
-2
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/DefaultUrlPatternWebResourceDownloadServiceImpl.java
...rces/DefaultUrlPatternWebResourceDownloadServiceImpl.java
+10
-3
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/DownloadServicesComparator.java
...est/integration/resources/DownloadServicesComparator.java
+2
-2
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/GenericDownloaderIntent.java
...y/rest/integration/resources/GenericDownloaderIntent.java
+60
-0
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/GenericDownloaderInterceptor.java
...t/integration/resources/GenericDownloaderInterceptor.java
+74
-0
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/NuxeoUrlPatternWebResourceDownloadServiceImpl.java
...ources/NuxeoUrlPatternWebResourceDownloadServiceImpl.java
+2
-7
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/ResourceDownloadService.java
...y/rest/integration/resources/ResourceDownloadService.java
+5
-2
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/RoutingResourceDownloadServiceImpl.java
...gration/resources/RoutingResourceDownloadServiceImpl.java
+3
-3
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/UrlPatternWebResourceDownloadService.java
...ation/resources/UrlPatternWebResourceDownloadService.java
+1
-1
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/WebResourceDownloadItf.java
...ry/rest/integration/resources/WebResourceDownloadItf.java
+5
-1
frascati/frascati-studio/src/main/resources/easysoa2.composite
...ati/frascati-studio/src/main/resources/easysoa2.composite
+7
-7
frascati/frascati-studio/src/main/resources/genericResourceDownloadIntent.composite
...rc/main/resources/genericResourceDownloadIntent.composite
+15
-0
frascati/frascati-studio/src/main/resources/webResourcesService.composite
...i-studio/src/main/resources/webResourcesService.composite
+38
-27
No files found.
frascati/frascati-studio/src/main/java/org/easysoa/codegenerator/CodeGeneratorWsdlToJSImpl.java
View file @
1469f1c0
...
...
@@ -57,7 +57,7 @@ import org.easysoa.api.CodeGenerator;
import
org.easysoa.api.PreferencesManagerItf
;
import
org.easysoa.api.ServiceManager
;
import
org.easysoa.model.Application
;
import
org.easysoa.registry.rest.integration.resources.R
outingWebR
esourceDownloadService
;
import
org.easysoa.registry.rest.integration.resources.ResourceDownloadService
;
import
org.easysoa.utils.WsdlInformations
;
import
org.json.simple.JSONArray
;
import
org.json.simple.JSONObject
;
...
...
frascati/frascati-studio/src/main/java/org/easysoa/codegenerator/CodeGeneratorWsdlToJavaImpl.java
View file @
1469f1c0
...
...
@@ -52,7 +52,7 @@ import org.easysoa.api.CodeGenerator;
import
org.easysoa.api.PreferencesManagerItf
;
import
org.easysoa.api.ServiceManager
;
import
org.easysoa.model.Application
;
import
org.easysoa.registry.rest.integration.resources.R
outingWebR
esourceDownloadService
;
import
org.easysoa.registry.rest.integration.resources.ResourceDownloadService
;
import
org.easysoa.utils.WsdlInformations
;
import
org.json.simple.JSONArray
;
import
org.json.simple.JSONObject
;
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/codegenerator/RegistryCodeGeneratorWsdlToJSImpl.java
View file @
1469f1c0
...
...
@@ -7,7 +7,7 @@ import java.io.IOException;
import
java.net.URL
;
import
org.easysoa.codegenerator.CodeGeneratorWsdlToJSImpl
;
import
org.easysoa.registry.rest.integration.resources.R
outingWebR
esourceDownloadService
;
import
org.easysoa.registry.rest.integration.resources.ResourceDownloadService
;
import
org.osoa.sca.annotations.Reference
;
/**
...
...
@@ -17,7 +17,7 @@ import org.osoa.sca.annotations.Reference;
public
class
RegistryCodeGeneratorWsdlToJSImpl
extends
CodeGeneratorWsdlToJSImpl
{
@Reference
protected
R
outingWebR
esourceDownloadService
routingService
;
protected
ResourceDownloadService
routingService
;
/**
* TODO better : local filename, auth, reuse or overwrite
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/codegenerator/RegistryCodeGeneratorWsdlToJavaImpl.java
View file @
1469f1c0
...
...
@@ -7,7 +7,7 @@ import java.io.IOException;
import
java.net.URL
;
import
org.easysoa.codegenerator.CodeGeneratorWsdlToJavaImpl
;
import
org.easysoa.registry.rest.integration.resources.R
outingWebR
esourceDownloadService
;
import
org.easysoa.registry.rest.integration.resources.ResourceDownloadService
;
import
org.osoa.sca.annotations.Reference
;
/**
...
...
@@ -17,7 +17,7 @@ import org.osoa.sca.annotations.Reference;
public
class
RegistryCodeGeneratorWsdlToJavaImpl
extends
CodeGeneratorWsdlToJavaImpl
{
@Reference
protected
R
outingWebR
esourceDownloadService
routingService
;
protected
ResourceDownloadService
routingService
;
/**
* TODO better : local filename OK TEST, auth, reuse or overwrite OK TEST
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/AbstractWebResourceDownloadService.java
View file @
1469f1c0
...
...
@@ -11,7 +11,7 @@ import org.osoa.sca.annotations.Property;
* @author jguillemotte
*
*/
public
abstract
class
AbstractWebResourceDownloadService
implements
WebResourceDownloadService
{
public
abstract
class
AbstractWebResourceDownloadService
implements
UrlPattern
WebResourceDownloadService
{
// integer for execution order : FraSCAti doesn't allow to use component list in a specified order
@Property
...
...
@@ -19,7 +19,7 @@ public abstract class AbstractWebResourceDownloadService implements WebResourceD
// Java regex pattern
@Property
protected
String
urlPattern
;
protected
String
urlPattern
;
/* (non-Javadoc)
* @see org.easysoa.registry.rest.integration.resources.WebResourceDownloadService#matchUrl(java.net.URL)
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/DefaultUrlPatternWebResourceDownloadServiceImpl.java
View file @
1469f1c0
...
...
@@ -10,6 +10,7 @@ import java.net.URL;
import
java.net.URLConnection
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.osoa.sca.annotations.Reference
;
import
org.osoa.sca.annotations.Scope
;
/**
...
...
@@ -19,10 +20,13 @@ import org.osoa.sca.annotations.Scope;
@Scope
(
"COMPOSITE"
)
public
class
DefaultUrlPatternWebResourceDownloadServiceImpl
extends
AbstractWebResourceDownloadService
{
@Reference
protected
WebResourceDownloadItf
downloadService
;
@Override
public
String
get
(
URL
url
)
throws
Exception
{
String
wsdlContent
=
""
;
/*
String wsdlContent = "";
if(url.toURI().toURL().toString().startsWith("file://")){
File file = new File(url.toURI());
...
...
@@ -35,8 +39,11 @@ public class DefaultUrlPatternWebResourceDownloadServiceImpl extends AbstractWeb
StringWriter writer = new StringWriter();
IOUtils.copy(in, writer, "UTF-8");
wsdlContent = writer.toString();
}
return
wsdlContent
;
}*/
//return wsdlContent;
return
downloadService
.
get
(
url
.
toString
());
}
}
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/DownloadServicesComparator.java
View file @
1469f1c0
...
...
@@ -9,10 +9,10 @@ import java.util.Comparator;
* @author jguillemotte
*
*/
public
class
DownloadServicesComparator
implements
Comparator
<
WebResourceDownloadService
>
{
public
class
DownloadServicesComparator
implements
Comparator
<
UrlPattern
WebResourceDownloadService
>
{
@Override
public
int
compare
(
WebResourceDownloadService
o1
,
WebResourceDownloadService
o2
)
{
public
int
compare
(
UrlPatternWebResourceDownloadService
o1
,
UrlPattern
WebResourceDownloadService
o2
)
{
if
(
o1
.
getExecutionOrder
()
>
o2
.
getExecutionOrder
()){
return
1
;
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/GenericDownloaderIntent.java
0 → 100644
View file @
1469f1c0
/**
* EasySOA Proxy Copyright 2011-2013 Open Wide
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact : easysoa-dev@googlegroups.com
*/
package
org
.
easysoa
.
registry
.
rest
.
integration
.
resources
;
import
org.apache.cxf.endpoint.Endpoint
;
import
org.apache.cxf.jaxrs.client.Client
;
import
org.apache.cxf.jaxrs.client.WebClient
;
import
org.ow2.frascati.intent.cxf.AbstractBindingIntentHandler
;
/**
*
* @author jguillemotte
*/
public
class
GenericDownloaderIntent
extends
AbstractBindingIntentHandler
{
String
login
=
"admin"
;
String
password
=
"admin"
;
// Add authentification (eg : to get wsdl from Nuxeo registry)
/**
* Apply this binding intent on a proxy instance.
* @param proxy the proxy instance to configure.
* @see BindingIntentHandler#apply(Object)
*/
@Override
public
final
void
apply
(
Object
proxy
)
{
// Obtain the endpoint associated to the proxy instance.
Endpoint
endpoint
=
null
;
// Is the proxy a Apache CXF REST client ?
if
(
proxy
instanceof
Client
)
{
endpoint
=
WebClient
.
getConfig
(
proxy
).
getConduitSelector
().
getEndpoint
();
}
if
(
endpoint
==
null
)
{
throw
new
IllegalArgumentException
(
proxy
+
" is not an Apache CXF REST client!"
);
}
// Add an interceptor on outgoing requests for the endpoint.
// Problem : how to pass URL and login/passwd params to the intent ???
// TODO : add a reference and pass it to the codeGenerator ???
endpoint
.
getOutInterceptors
().
add
(
new
GenericDownloaderInterceptor
());
super
.
apply
(
proxy
);
}
}
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/GenericDownloaderInterceptor.java
0 → 100644
View file @
1469f1c0
/**
* EasySOA Proxy Copyright 2011-2013 Open Wide
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact : easysoa-dev@googlegroups.com
*/
package
org
.
easysoa
.
registry
.
rest
.
integration
.
resources
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.cxf.message.Message
;
import
org.apache.cxf.phase.AbstractPhaseInterceptor
;
import
org.apache.cxf.phase.Phase
;
/**
*
* @author jguillemotte
*/
public
class
GenericDownloaderInterceptor
extends
AbstractPhaseInterceptor
<
Message
>
{
//private String login;
//private String password;
public
GenericDownloaderInterceptor
()
{
super
(
Phase
.
USER_LOGICAL
);
}
@Override
public
void
handleMessage
(
Message
message
)
{
// Replace the predifined address by the given address
String
address
=
(
String
)
message
.
get
(
Message
.
ENDPOINT_ADDRESS
);
// Removing the base address configured in the binding rest (see the webResourceService composite)
// TODO : replace required here because the received message URL miss a /
// Find the reason why and remove the replace method call
address
=
address
.
substring
(
address
.
indexOf
(
"http://localhost/"
)+
17
).
replace
(
"http:/"
,
"http://"
);
//message.put(Message.ENDPOINT_ADDRESS, "http://soap.amazon.com/schemas2/AmazonWebServices.wsdl");
message
.
put
(
Message
.
ENDPOINT_ADDRESS
,
address
);
// TODO : how to pass dynamically the login/password for authentification ??
/*
// Build the authentification header value
StringBuilder authValue = new StringBuilder("basic ");
// Encode in base 64
authValue.append(encode64(login, password));
List<String> authValueList = new ArrayList<String>();
authValueList.add(authValue.toString());
// Get the existing headers
Map<String, List<String>> headers = (Map<String, List<String>>) message.get(Message.PROTOCOL_HEADERS);
// Add basic authentification
headers.put("Authorization", authValueList);
// Add HTTP headers to the web service request
//message.put(Message.PROTOCOL_HEADERS, headers);
*/
}
// TODO dummy method, replace or call a real base 64 encoding method
private
String
encode64
(
String
login
,
String
password
){
return
""
;
}
}
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/NuxeoUrlPatternWebResourceDownloadServiceImpl.java
View file @
1469f1c0
...
...
@@ -3,13 +3,7 @@
*/
package
org
.
easysoa
.
registry
.
rest
.
integration
.
resources
;
import
java.io.File
;
import
java.net.URL
;
import
java.util.regex.PatternSyntaxException
;
import
javax.ws.rs.core.Response
;
import
org.osoa.sca.annotations.Property
;
import
org.osoa.sca.annotations.Reference
;
import
org.osoa.sca.annotations.Scope
;
...
...
@@ -20,8 +14,9 @@ import org.osoa.sca.annotations.Scope;
@Scope
(
"COMPOSITE"
)
public
class
NuxeoUrlPatternWebResourceDownloadServiceImpl
extends
AbstractWebResourceDownloadService
{
// Nuxeo download service reference
@Reference
protected
NuxeoDownload
downloadService
;
protected
WebResourceDownloadItf
downloadService
;
/* (non-Javadoc)
* @see org.easysoa.registry.rest.integration.resources.WebResourceDownloadService#get(java.net.URL)
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/R
outingWebR
esourceDownloadService.java
→
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/ResourceDownloadService.java
View file @
1469f1c0
...
...
@@ -4,11 +4,14 @@ import java.io.File;
import
java.net.URL
;
import
javax.ws.rs.GET
;
import
javax.ws.rs.Path
;
import
javax.ws.rs.core.Response
;
import
org.easysoa.api.PreferencesManagerItf
;
public
interface
RoutingWebResourceDownloadService
{
/**
*
* @author jguillemotte
*/
public
interface
ResourceDownloadService
{
/**
* Get the file corresponding to the given URL
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/Routing
Web
ResourceDownloadServiceImpl.java
→
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/RoutingResourceDownloadServiceImpl.java
View file @
1469f1c0
...
...
@@ -22,10 +22,10 @@ import org.osoa.sca.annotations.Scope;
*
*/
@Scope
(
"COMPOSITE"
)
public
class
Routing
WebResourceDownloadServiceImpl
implements
RoutingWeb
ResourceDownloadService
{
public
class
Routing
ResourceDownloadServiceImpl
implements
ResourceDownloadService
{
@Reference
protected
List
<
WebResourceDownloadService
>
downloadServices
;
protected
List
<
UrlPattern
WebResourceDownloadService
>
downloadServices
;
/* (non-Javadoc)
* @see org.easysoa.registry.rest.integration.resources.RoutingWebResourceDownloadService#get(java.net.URL)
...
...
@@ -39,7 +39,7 @@ public class RoutingWebResourceDownloadServiceImpl implements RoutingWebResource
// Need to be sorted manually because FraSCAti doesn't provide a native way to specify an execution order
Collections
.
sort
(
downloadServices
,
new
DownloadServicesComparator
());
for
(
WebResourceDownloadService
service
:
downloadServices
){
for
(
UrlPattern
WebResourceDownloadService
service
:
downloadServices
){
if
(
service
.
matchUrl
(
url
)){
// file type is always WSDL ??
String
tempFolder
=
preferences
.
getWorkspacePath
();
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/WebResourceDownloadService.java
→
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/
UrlPattern
WebResourceDownloadService.java
View file @
1469f1c0
...
...
@@ -10,7 +10,7 @@ import java.net.URL;
* @author jguillemotte
*
*/
public
interface
WebResourceDownloadService
{
public
interface
UrlPattern
WebResourceDownloadService
{
/**
* Download a resource and store it locally
...
...
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/
NuxeoDownload
.java
→
frascati/frascati-studio/src/main/java/org/easysoa/registry/rest/integration/resources/
WebResourceDownloadItf
.java
View file @
1469f1c0
...
...
@@ -4,7 +4,11 @@ import javax.ws.rs.GET;
import
javax.ws.rs.Path
;
import
javax.ws.rs.PathParam
;
public
interface
NuxeoDownload
{
/**
*
* @author jguillemotte
*/
public
interface
WebResourceDownloadItf
{
//http://localhost:8080/nuxeo/nxfile/default/eb1dfac2-23f1-48a6-95e8-de742c0af7dc/blobholder:0/ContactSvc.asmx.wsdl
@GET
...
...
frascati/frascati-studio/src/main/resources/easysoa2.composite
View file @
1469f1c0
...
...
@@ -103,13 +103,13 @@ TODO : Use an include tag with the easysoa.composite file instead of a raw copie
<wire
source=
"ProxyWSTemplateAction/generators"
target=
"CodeGeneratorWsdlToJava/codeGeneratorWsdlToJava"
/>
<wire
source=
"ProxyWSLogTemplateAction/generators"
target=
"CodeGeneratorWsdlToJava/codeGeneratorWsdlToJava"
/>
<!-- Routing web resources download component, referring to webResourcesService.composite -->
<component
name=
"RoutingWebResourceServiceComponent"
>
<service
name=
"routingWebResourceServiceService"
>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.RoutingWeb
ResourceDownloadService"
/>
</service>
<implementation.composite
name=
"webResourcesService.composite"
/>
</component>
<!-- Routing web resources download component, referring to webResourcesService.composite -->
<component
name=
"RoutingWebResourceServiceComponent"
>
<service
name=
"routingWebResourceServiceService"
>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.
ResourceDownloadService"
/>
</service>
<implementation.composite
name=
"webResourcesService.composite"
/>
</component>
<component
name=
"Friends"
>
<implementation.java
class=
"org.easysoa.impl.FriendsImpl"
/>
...
...
frascati/frascati-studio/src/main/resources/genericResourceDownloadIntent.composite
0 → 100644
View file @
1469f1c0
<?xml version="1.0" encoding="UTF-8"?>
<sca:composite
xmlns:frascati=
"http://frascati.ow2.org/xmlns/sca/1.1"
xmlns:instance=
"http://www.w3.org/2004/08/wsdl-instance"
xmlns:sca=
"http://www.osoa.org/xmlns/sca/1.0"
name=
"genericResourceDownloadIntent"
>
<sca:service
name=
"intent"
promote=
"genericResourceIntent/intentService"
/>
<sca:component
name=
"genericResourceIntent"
>
<sca:service
name=
"intentService"
>
<sca:interface.java
interface=
"org.objectweb.fractal.bf.connectors.common.BindingIntentHandler"
/>
</sca:service>
<sca:implementation.java
class=
"org.easysoa.registry.rest.integration.resources.GenericDownloaderIntent"
/>
</sca:component>
</sca:composite>
\ No newline at end of file
frascati/frascati-studio/src/main/resources/webResourcesService.composite
View file @
1469f1c0
<?xml version="1.0" encoding="UTF-8"?>
<composite
xmlns=
"http://www.osoa.org/xmlns/sca/1.0"
xmlns:frascati=
"http://frascati.ow2.org/xmlns/sca/1.1"
xmlns:web=
"http://frascati.ow2.org/xmlns/web/1.0"
xmlns:sca=
"http://tuscany.apache.org/xmlns/sca/1.0"
name=
"webResourcesService"
>
xmlns:frascati=
"http://frascati.ow2.org/xmlns/sca/1.1"
xmlns:web=
"http://frascati.ow2.org/xmlns/web/1.0"
xmlns:sca=
"http://tuscany.apache.org/xmlns/sca/1.0"
name=
"webResourcesService"
>
<!--<service name="webResourceRoutingService" promote="RoutingWebResourceService/routingWebResourceService">
<interface.java interface="org.easysoa.registry.rest.integration.resources.RoutingWebResourceDownloadService" />
<frascati:binding.rest uri="/webResourceRoutingService" />
</service>-->
<interface.java interface="org.easysoa.registry.rest.integration.resources.RoutingWebResourceDownloadService" />
<frascati:binding.rest uri="/webResourceRoutingService" />
</service>-->
<service
name=
"routingWebResourceServiceService"
promote=
"RoutingWebResourceService/routingWebResourceService"
>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.RoutingWeb
ResourceDownloadService"
/>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.
ResourceDownloadService"
/>
</service>
<!-- Routing service -->
<!-- Routing service -->
<component
name=
"RoutingWebResourceService"
>
<implementation.java
class=
"org.easysoa.registry.rest.integration.resources.Routing
Web
ResourceDownloadServiceImpl"
/>
<implementation.java
class=
"org.easysoa.registry.rest.integration.resources.RoutingResourceDownloadServiceImpl"
/>
<service
name=
"routingWebResourceService"
>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.R
outingWebR
esourceDownloadService"
/>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.ResourceDownloadService"
/>
</service>
<reference
multiplicity=
"0..n"
name=
"downloadServices"
>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.WebResourceDownloadService"
/>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.
UrlPattern
WebResourceDownloadService"
/>
</reference>
</component>
<!-- For EasySOA and Nuxeo resources -->
<!-- For EasySOA and Nuxeo resources -->
<component
name=
"EasySOARegistryWebResourceDownload"
>
<implementation.java
class=
"org.easysoa.registry.rest.integration.resources.NuxeoUrlPatternWebResourceDownloadServiceImpl"
/>
<service
name=
"easySOARegistryWebResourceDownload"
>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.WebResourceDownloadService"
/>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.
UrlPattern
WebResourceDownloadService"
/>
</service>
<property
name=
"urlPattern"
>
(http|https)://(.*)/nuxeo(.+)
</property>
<!-- Property executionOrder is used to define an execution order in case of multiple component references stored in a list -->
<!-- Required because FraSCAti doesn't provide a way to specify an execution order -->
<!-- Property executionOrder is used to define an execution order in case of multiple component references stored in a list -->
<!-- Required because FraSCAti doesn't provide a way to specify an execution order -->
<property
name=
"executionOrder"
>
1
</property>
<reference
name=
"downloadService"
>
<frascati:binding.rest
uri=
"http://localhost:8080/nuxeo/nxfile/default/"
requires=
"nuxeoAuthorization"
/>
<frascati:binding.rest
uri=
"http://localhost:8080/nuxeo/nxfile/default/"
requires=
"nuxeoAuthorization"
/>
<!--<interface.java interface="org.easysoa.registry.rest.integration.resources.WebResourceDownloadItf"></interface.java>-->
<!-- TODO interface -->
</reference>
</component>
<wire
source=
"RoutingWebResourceService/downloadServices"
target=
"EasySOARegistryWebResourceDownload/easySOARegistryWebResourceDownload"
/>
...
...
@@ -52,25 +54,34 @@
-->
<!-- For all other resources -->
<!-- Prefix z because the list is explored by alphabetical order -->
<component
name=
"DefaultWebResourceDownload"
>
<implementation.java
class=
"org.easysoa.registry.rest.integration.resources.DefaultUrlPatternWebResourceDownloadServiceImpl"
/>
<service
name=
"defaultWebResourceDownload"
>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.WebResourceDownloadService"
/>
<interface.java
interface=
"org.easysoa.registry.rest.integration.resources.
UrlPattern
WebResourceDownloadService"
/>
</service>
<property
name=
"urlPattern"
>
.*
</property>
<!-- Property executionOrder is used to define an execution order in case of multiple component references stored in a list -->
<!-- Required because FraSCAti doesn't provide a way to specify an execution order -->
<property
name=
"executionOrder"
>
2
</property>
<property
name=
"urlPattern"
>
.*
</property>
<!-- Property executionOrder is used to define an execution order in case of multiple component references stored in a list -->
<!-- Required because FraSCAti doesn't provide a way to specify an execution order -->
<property
name=
"executionOrder"
>
2
</property>
<!-- Add a rest binding on / -->
<!-- Modify the address dynamilcaly with the genericDownloaderIntent -->
<!-- Add the same intent to add authentification -->
<!-- requires="nuxeoAuthorization" -->
<!-- requires="genericResourceDownloadIntent" -->
<reference
name=
"downloadService"
>
<frascati:binding.rest
uri=
"http://localhost/"
requires=
"genericResourceDownloadIntent"
/>
<!--<interface.java interface="org.easysoa.registry.rest.integration.resources.WebResourceDownloadItf"></interface.java>-->
</reference>
</component>
<wire
source=
"RoutingWebResourceService/downloadServices"
target=
"DefaultWebResourceDownload/defaultWebResourceDownload"
/>
<!-- Nuxeo authentification -->
<component
name=
"nuxeoAuthorization"
>
<implementation.composite
name=
"BasicAuthorizationPolicyIntent"
/>
<property
name=
"UserName"
>
${nuxeo.login}
</property>
<property
name=
"Password"
>
${nuxeo.password}
</property>
</component>
<component
name=
"nuxeoAuthorization"
>
<implementation.composite
name=
"BasicAuthorizationPolicyIntent"
/>
<property
name=
"UserName"
>
${nuxeo.login}
</property>
<property
name=
"Password"
>
${nuxeo.password}
</property>
</component>
</composite>
\ No newline at end of file
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