caelum / restfulie-java Goto Github PK
View Code? Open in Web Editor NEWrestfulie implementation in java, with support to vraptor
Home Page: http://github.com/caelum/restfulie-java
License: Other
restfulie implementation in java, with support to vraptor
Home Page: http://github.com/caelum/restfulie-java
License: Other
In order to... define all possible states and transitions
I want to... allow the user to define a method which "builds" states and returns a list of them so restfulie can allow/block transition transit while executing it:
i.e.:
public List<State> getStates(Restfulie control) {
control.state("unpaid").allow("cancel");
return control.getStates();
//
control.state("ready").allow("receive").when(new InventoryAvailabilityOnTheNetwork());
new Dependency() {
public boolean allows(Order order) {
//return order.getStatus()=="payed" && order.getPaymentTime()<1minute;
return true;
}
})
}
when following a link the precedence of choosing an media type is:
1 - the user itself provide it
2 - if the link has provided an media-type it should be used
3 - use the same as the last request
migrate doc pages to javadoc and simple README
Server side should support JAX-RS
move restfulie to main vraptor
resource.links.xpto.get
resource.links.xpto.post
resource.links.xpto.patch
client should package-scan for classes with @XStreamAlias, and registar ir automatically at the json and xml mediay types, this feature must have an way to be disabled.
Opensearch ruby implementation is here:
https://github.com/caelum/medie/blob/master/lib/medie/open_search/driver.rb https://github.com/caelum/medie/blob/master/lib/medie/open_search/descriptor.rb
The fclient code will look lke:
result = Restfulie.at(uri).get();
SearchDescription desc = result.getResource();
result = desc.use("application/xml").search("guilherme", 5);
There is no need for javassist with all methods. Get rid of it...
Just delegate to a non-dynamic implementation
The java client should support unknown media type without dying
Results should not be unmarshalled by default.
Unmarshalling can also be done to some generic entities instead of direct linkage.
client code with charset on content type likes
restfulie
.at("http://localhost:8081/faturamento/boleto/create")
.as("application/xml;charset=utf-8").accept("application/xml").post(object)
generates an exception
Exception in thread "main" br.com.caelum.restfulie.RestfulieException: Unsupported media type 'application/xml;charset=utf-8'
at br.com.caelum.restfulie.mediatype.MediaTypes.forContentType(MediaTypes.java:27)
at br.com.caelum.restfulie.http.apache.ApacheDispatcher.handlerFor(ApacheDispatcher.java:92)
at br.com.caelum.restfulie.http.apache.ApacheDispatcher.process(ApacheDispatcher.java:73)
at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:38)
at br.com.caelum.restfulie.request.RequestChain.next(RequestChain.java:20)
at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:29)
at br.com.caelum.restfulie.http.DefaultHttpRequest.sendPayload(DefaultHttpRequest.java:43)
at br.com.caelum.restfulie.http.DefaultHttpRequest.post(DefaultHttpRequest.java:98)
at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.create(FaturamentoRestServiceImpl.java:73)
at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.main(FaturamentoRestServiceImpl.java:28)
without charset type works fine but truncate acentuation os server side
so we can use:
for (Header header : response.getHeaders()) {
....
}
[]'s
when you do a GET for an inexistant resource and the server answers with a 404, it's raising a FileNotFoundException from java.net.http lib.
It'd be better to have nicer message and error handling.
create video and material
create data and video
move java docs to new style
Hey guys,
there is no commit here for a very long time, is this because the project is stable of because nobody has interest on it anymore?
license description should be within all files
links.x.as("").post
java.lang.IllegalStateException: Unable to extend type br.com.caelum.restfulie.mediatype.EnhancedList
at br.com.caelum.restfulie.relation.Enhancer.enhanceResource(Enhancer.java:24)
at br.com.caelum.restfulie.mediatype.XStreamHelper.getXStream(XStreamHelper.java:120)
at br.com.caelum.restfulie.mediatype.JsonMediaType.<init>(JsonMediaType.java:33)
at br.com.caelum.restfulie.http.DefaultRestClient.<init>(DefaultRestClient.java:55)
at br.com.caelum.restfulie.Restfulie.custom(Restfulie.java:45)
at br.com.caelum.vraptor.blank.IndexController.index(IndexController.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:61)
... 37 more
Caused by: javassist.NotFoundException: br.com.caelum.restfulie.mediatype.EnhancedList
at javassist.ClassPool.get(ClassPool.java:436)
at br.com.caelum.restfulie.relation.Enhancer.enhanceResource(Enhancer.java:18)
... 47 more
Support java process modelling on the client side
If conneg is not requesting anything, serve the first registered representation.
client should be able to post json
if there is no route for HEAD a path, but there is aroute for GET a path, do the GET but return only th
migrate restfulie-java to vraptor
In order to... set when an operation should be executed or not (etag, conditions etc)
I want to... allow the user to invoke methods within the dsl
i.e.:
Receipt receipt = resource(order).getTransition("pay").inCase(matches(whatever())).execute(payment);
supporting Restfulie.at().with(throwError()) instead of
Restfulie.at().throwError();
Posting should allow recipes (in a format similar to tokamak) to be passed
By using a default Restfulie config it should guess server name and port, if not yet provided
vraptor should be able to generate hypermedia links when representing with json
Why it throws this exception?
restfulie should be able to post and get using application/x-www-form-urlencoded media type.
Maybe support it with maps or a Params object.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.