Skip to main content

Home/ Java Development/ Group items tagged rest

Rss Feed Group items tagged

Hendy Irawan

AtomServer 2.3.4 - - 0 views

  •  
    "AtomServer is a generic data store implemented as a RESTful web service. It is designed as a GData-style Atom Store. It is based on the following concepts and protocols; REST. REST is a design pattern. It's not a technology like SOAP or HTTP. REST is a proven design pattern for building loosely-coupled, highly-scalable applications. There are important benefits to sticking to the REST design pattern; Simple. REST is incredibly simple to define. There are just a handful of principles and well defined semantics associated with it. Scalable. REST leads to a very scalable solution by promoting a stateless protocol and allowing state to be distributed across the web. Layered. REST allows any number of intermediaries, such as proxies, gateways, and firewalls. Ultimately REST is just a web site, albeit one that adheres to a design pattern, so one can easily layer aspects such as Security, Compression, etc. on an as needed basis. Atom. Fundamentally, Atom is an XML vocabulary for describing lists of timestamped entries. These entries can be anything, although because Atom was originally conceived to replace RSS, Atom lists are Feeds, and the items in the lists are Entries. Atom is a RESTful protocol. AtomServer stands on the shoulders of giants. It is built on top of several open source projects - most notably, Apache Abdera (a Java-based Atom Publishing framework) and Spring. AtomServer is an Atom Store. Thus, it requires a relational database to run. AtomServer currently supports; PostgresSQL, SQLServer, and HSQLDB. Using HSQLDB, AtomServer requires zero configuration and can run out-of-the-box. While this configuration is suitable for many applications, those that see significant load will likely require a database with better transactional semantics, such as PostgreSQL. AtomServer is easy to use. It deploys as a simple WAR file into any Servlet container. Or alternately, can be used out-of-the-box as a standalone server, running with
Hendy Irawan

WADL - Jersey: RESTful Web services made easy - wikis.sun.com - 0 views

  •  
    "Out of the box Jersey generates basic WADL at runtime that you can obtain from your REST app via GET http://path.to.your/restapp/application.wadl. Additionally you can configure Jersey to create an extended WADL including e.g. additional doc elements or javadoc read from your resource classes: There's a custom doclet that writes your javadoc to a file so that it can be used to extend the WADL. Additionally there's the maven-wadl-plugin that allows you to create the WADL without your running REST app."
Hendy Irawan

A simple JAX-RS security context example in GlassFish - butonic.de - 0 views

  •  
    When creating a REST api with Java EE 6 and JAX-RS there comes the time when you start thinking about security. In our case we were trying to set up HTTP Basic Auth for the REST api to identify users and keep them from deleting other peoples stuff. It took me a while to understand the different aspects of configuring HTTP Basic Auth when using GlassFish:
Hendy Irawan

Apache CXF -- Index - 0 views

  •  
    Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI. CXF includes a broad feature set, but it is primarily focused on the following areas: Web Services Standards Support: CXF supports a variety of web service standards including SOAP, the WS-I Basic Profile, WSDL, WS-Addressing, WS-Policy, WS-ReliableMessaging, WS-Security, WS-SecurityPolicy, WS-SecureConverstation, and WS-Trust (partial). Frontends: CXF supports a variety of "frontend" programming models. CXF implements the JAX-WS APIs (TCK compliant). CXF JAX-WS support includes some extensions to the standard that make it significantly easier to use, compared to the reference implementation: It will automatically generate code for request and response bean classes, and does not require a WSDL for simple cases. It also includes a "simple frontend" which allows creation of clients and endpoints without annotations. CXF supports both contract first development with WSDL and code first development starting from Java. For REST, CXF also supports a JAX-RS (TCK compliant) frontend. Ease of use: CXF is designed to be intuitive and easy to use. There are simple APIs to quickly build code-first services, Maven plug-ins to make tooling integration easy, JAX-WS API support, Spring 2.x XML support to make configuration a snap, and much more. Binary and Legacy Protocol Support: CXF has been designed to provide a pluggable architecture that supports not only XML but also non-XML type bindings, such as JSON and CORBA, in combination with any type of transport. To get started using CXF, check out the downloads, the user's guide, or the mailing lists to get more information!
Javier Neira

REST for Java developers, Part 4: The future is RESTful - JavaWorld - 0 views

  • Tyranny of the Common Form. The social costs of getting everyone to agree to the definition of these central models always outweigh the technical costs of implementing them.
Hendy Irawan

HowToConfigureExtendedWADL - Jersey: RESTful Web services made easy - wikis.sun.com - 0 views

  •  
    "This page describes how you can get an extended WADL from your REST app. It aligns mostly with the extended-wadl-webapp sample and uses these features: Add additional doc tags to the WADL Create JAXB beans from xsd - you might also create the schema from your beans Add the grammars element that includes the xsd file from which JAXB beans were generated to the WADL Add javadoc from your resource classes to the WADL, using most of the supported javadoc tags For getting the extended WADL as described above these things have to be done: Configure the maven-jaxb-plugin to create JAXB beans from xsd - this is described here just to describe what's done in the sample. Add the application-doc.xml and application-grammars.xml to the build classpath Configure the maven-javadoc-plugin with the ResourceDoclet provided by the wadl-resourcedoc-doclet artifact to create the resource-doc.xml. Create a subclass of WadlGeneratorConfig that defines/configures the WadlGenerators to use Specify your custom WadlGeneratorConfig in the web.xml as the WadlGeneratorConfig"
Hendy Irawan

Drools & jBPM: AtomPub Interface for Guvnor - 0 views

  •  
    " Further talk about the overall approach to REST access in the Guvnor project expanded from the JIRA issue, ad hoc discussions on the dev list to Jevis Liu's "AtomPub Interface for Guvnor" proposal on the Drools community wikI. Taking off from where Michael Neale's original "Guvnor AtomPub Interface" started in 2008 and expanding into categories, metadata and other return types, this page became a rough, but working implementation specification. "
Hendy Irawan

Shrinkwrap - JBoss Community - 0 views

  • Shrinkwrap provides a simple mechanism to assemble archives like JARs, WARs, and EARs with a friendly, fluent API.
  •  
    Shrinkwrap provides a simple mechanism to assemble archives like JARs, WARs, and EARs with a friendly, fluent API. JavaArchive archive = ShrinkWrap.create(JavaArchive.class,"archive.jar")    .addClasses(MyClass.class,MyOtherClass.class)    .addResource("mystuff.properties"); From there you may deploy directly into any supported integration container like JBoss EmbeddedAS, GlassFish v3 Embedded, Jetty, or OpenEJB.  Or perhaps you'd like to export the archive to a file or exploded directory structure.  Maybe you'd prefer to serialize it over the network to a remote host.  The possibilities are limitless. To boot, ShrinkWrap is the supported deployment mechanism of the Arquillian project, and together we render the testing of true enterprise components amiable as a puppy.  Where Java EE brought a POJO programming model to application development, we've brought it to testing.  You handle your business logic; we'll do the rest. To foster community participation, the majority of documentation and examples are available through our Wiki. Releases are available either via our Downloads section, or through the JBoss Maven Repository, which we recommend is configured in ${userHomeDir}/.m2/settings.xml:
Hendy Irawan

smart-util - Utility tools for wide usage - Google Project Hosting - 0 views

  •  
    This project will mainly contain utility stuff for diverse purpose. Initially it will primarily comprise of Spring Utilities which will perform the following purposes: Load a single resource properties file from pre-configured locations with priority based override. Application context registrar to make the context available to other interested components. Use Cacheable Jersey Client Use a generic RESTful WS Client OpenSearchDescriptor JAX-RS Provider based on XOM based DOM I/O Useful utilities for Atom Syndication Feed, such as pagination over entities, retrieval of resource to certain depth, etc.
Hendy Irawan

Easy restfull JAX-RS webservices and extended WADL on Glassfish v3 (using ant.) - 0 views

  •  
    "So, we are going to look at a restful webservice that is going to generate XML. As you might know, we have the perfect JSR specification for that in the form of JAXB. The needed libraries are already available in Netbeans 6.8. And as you might have guessed, returning JAXB objects from a JAX-RS method is going to integrate naturally and take some strain from our shoulders. No need to marshal and unmarshal by ourself. "
anonymous

1. Working with Spring Data Repositories - 0 views

  • Typically, your repository interface will extend Repository, CrudRepository or PagingAndSortingRepository. Alternatively, if you do not want to extend Spring Data interfaces, you can also annotate your repository interface with @RepositoryDefinition
  • It allows quick query definition by method names but also custom-tuning of these queries by introducing declared queries as needed.
  • CREATE_IF_NOT_FOUND (default)CREATE_IF_NOT_FOUND combines CREATE and USE_DECLARED_QUERY.
  • ...21 more annotations...
  • the first By acts as delimiter to indicate the start of the actual criteria
  • The mechanism strips the prefixes find…By, read…By, and get…By from the method and starts parsing the rest of it
  • you can define conditions on entity properties and concatenate them with And and Or
  • The introducing clause can contain further expressions such as a Distinct to set a distinct flag
  • List<Person> findByEmailAddressAndLastname(EmailAddress emailAddress, String lastname); // Enables the distinct flag for the query List<Person> findDistinctPeopleByLastnameOrFirstname(String lastname, String firstname); List<Person> findPeopleDistinctByLastnameOrFirstname(String lastname, String firstname); // Enabling ignoring case for an individual property List<Person> findByLastnameIgnoreCase(String lastname); // Enabling ignoring case for all suitable properties List<Person> findByLastnameAndFirstnameAllIgnoreCase(String lastname, String firstname); // Enabling static ORDER BY for a query List<Person> findByLastnameOrderByFirstnameAsc(String lastname); List<Person> findByLastnameOrderByFirstnameDesc(String lastname);
  • You can combine property expressions with AND and OR. You also get support for operators such as Between, LessThan, GreaterThan, Like for the property expressions
  • AllIgnoreCase
  • IgnoreCase
  • The resolution algorithm starts with interpreting the entire part (AddressZipCode) as the property and checks the domain class for a property with that name (uncapitalized). If the algorithm succeeds it uses that property. If not, the algorithm splits up the source at the camel case parts from the right side into a head and a tail and tries to find the corresponding property, in our example, AddressZip and Code.
  • he infrastructure will recognize certain specific types like Pageable and Sort to apply pagination and sorting to your queries dynamically
  • Pageable
  • Sort sort
  • The first method allows you to pass an org.springframework.data.domain.Pageable instance to the query method to dynamically add paging to your statically defined query. Sorting options are handled through the Pageable instance too
  • <repositories base-package="com.acme.repositories" />
  • Spring is instructed to scan com.acme.repositories and all its subpackages for interfaces extending Repository or one of its subinterfaces. For each interface found, the infrastructure registers the persistence technology-specific FactoryBean to create the appropriate proxies that handle invocations of the query methods. Each bean is registered under a bean name that is derived from the interface name, so an interface of UserRepository would be registered under userRepository
  • This postfix defaults to Impl.Example 1.12. Configuration example<repositories base-package="com.acme.repository" /> <repositories base-package="com.acme.repository" repository-impl-postfix="FooBar" />The first configuration example will try to look up a class com.acme.repository.UserRepositoryImpl to act as custom repository implementation, where the second example will try to lookup com.acme.repository.UserRepositoryFoo
  • To exclude an interface that extends Repository from being instantiated as a repository instance, you can either annotate it with @NoRepositoryBean or move it outside of the configured base-package.
  • ]In general, the integration support is enabled by using the @EnableSpringDataWebSupport annotation in your JavaConfig configuration class.
  • @Configuration @EnableWebMvc @EnableSpringDataWebSupport class WebConfiguration { }
  • In case you need multiple Pageables or Sorts to be resolved from the request (for multiple tables, for example) you can use Spring's @Qualifier annotation to distinguish one from another
  • Spring HATEOAS ships with a representation model class PagedResources that allows enrichting the content of a Page instance with the necessary Page metadata as well as links to let the clients easily navigate the pages.
Davor Poldrugo

The ASF Resigns From the JCP Executive Committee - 0 views

  • Oracle provided the EC with a Java SE 7 specification request and license that are self-contradictory, severely restrict distribution of independent implementations of the spec, and most importantly, prohibit the distribution of independent open source implementations of the spec.  Oracle has refused to answer any reasonable and responsible questions from the EC regarding these problems.
  • In the phrase "fail to uphold their responsibilities under the JSPA", we are referring to Oracle's refusal to provide the ASF's Harmony project with a TCK license for Java SE that complies with Oracle's obligations under the JSPA as well as public promises made to the Java community by officers of Sun Microsystems (recently acquired by Oracle.)
  • it should be noted that the majority of the EC members, including Oracle, have publicly stated that restrictions on distribution such as those found in the Java SE 7 license have no place in the JCP - and two distinguished individual members of the EC, Doug Lea and Tim Peierls, both have resigned in protest over the same issue.
  • ...9 more annotations...
  • By approving Java SE 7, the EC has failed on both counts : the members of the EC refused to stand up for the rights of implementers, and by accepting Oracle's TCK license terms for Java SE 7, they let the integrity of the JCP's licensing structure be broken.
  • The Apache Software Foundation concludes that that JCP is not an open specification process
  • and finally, the EC is unwilling or unable to assert the basic power of their role in the JCP governance process
  • In short, the EC and the Java Community Process are neither.
  • To that end, our representative has informed the JCP's Program Management Office of our resignation, effective immediately.  As such, the ASF is removing all official representatives from any and all JSRs. In addition, we will refuse any renewal of our JCP membership and, of course, our EC position.
  • Okay ! Java's privatized now... What now ?
  • Thank god I moved off Java in time. Suddenly Oracle is the new Death Star, replacing Microsoft.
  • This is a sad, sad day in the Java community. I hoped that Oracle would back-peddle and realize the folly of their ways. Now Java will be to Oracle what .NET is to Microsoft and it will be the death of Java as we know it.
  • Posibly in few years we'll see Apache as a new Sun for "Java", followed by Eclipse, Google, etc... I hope this is a great movement done by Apache for the community. We'll see... The objetive of Oracle are Enterprises that cannot move from Java because of hight investments, it will earn a lot of money from them. Oracle ignores the community because is not going to pay for (expensive, as all the rest of Oracle products) licenses... We'll se...
  •  
    The Apache Software Foundation has resigned its seat on the Java SE/EE Executive Committee. Apache has served on the EC for the past 10 years, winning the JCP "Member of the Year" award 4 times, and recently was ratified for another term with support from 95% of the voting community. Further, the project communities of the ASF, home to Apache Tomcat, Ant, Xerces, Geronimo, Velocity and nearly a 100 mainstay java components have implemented countless JSRs and serve on and contribute to many of the JCPs technical expert groups. We'd like to provide some explanation to the community as to why we're taking this significant step.
anonymous

Large scale application development and MVP - Part II - Google Web Toolkit - Google Code - 0 views

  • itself
    • anonymous
       
      The View Implementation
  • @UiHandler("
  • presenter.onAddButtonClicked();
  • ...91 more annotations...
  • onAddButtonClicked
  • eventBus.fireEvent(new AddContactEvent());
  • presenter needs to know more about the view
  • view needs to know more about the data model
  • data types are typically homogeneous within column borders
  • ColumnDefinition abstract class
  • houses the any type-specific code (this is the third party mentioned above)
  • ColumnDefinition
  • ColumnDefinition(s) would be created outside of the presenter
  • we can reuse its logic regardless of what view we've attached ourself to
  • update our views such that we can set their ColumnDefinition(s).
  • setColumnDefinitions
  • this.columnDefinitions = columnDefinitions;
  • so that we can pass in
  • a mocked ContactsView instance when testing our ContactsPresenter
  • in our AppController, when we create the ContactsView,
  • new ContactsViewColumnDefinitions().getColumnDefinitions();
  • we can initialize it with the necessary ColumnDefinition(s).
  • contactsView.setColumnDefiniions(
    • anonymous
       
      Initialize ContactsView with the necessary ColumnDefinition(s)
  • With our ColumnDefinition(s) we can pass the model untouched.
  • As mentioned above we were previously dumbing down the model into a list of Strings
  • current solution
  • List<String> data
  • display.setData(data);
  • how that data type is rendered.
  • use generics
  • third party that abstracts
  • knowledge of a cell's data type
  • stringing together a list of these classes
  • providing the necessary render()
  • and isClickable()/isSelectable() override
  • ContactsViewColumnDefinitions<ContactDetails>
  • columnDefinitions =      new ArrayList<ColumnDefinition<ContactDetails>>()
  • ColumnDefinition<T>
  • ContactsPresenter
  • ContactsViewImpl
  • ColumnDefinition<T> columnDefinition = columnDefinitions.get(j);
  • the presenter can pass the model untouched
  • the view has no rendering code
  • that we would otherwise need to test. And the fun doesn't stop there.
  • presenter.onItemClicked(
  • presenter.onItemSelected
  • ClickEvent
  • cell.getCellIndex()
  • columnDefinition.isClickable()
  • SelectEvent
  • columnDefinition.isSelectable()
  • return shouldFireClickEvent;
  • return shouldFireSelectEvent;
  • respond to user interaction in different ways based upon the cell type that was clicked
  • use them for rendering purposes
  • defining how to interpret user interactions
  • we're going to remove any application state from the ContactsView
  • replace the view's getSelectedRows() with a SelectionModel
  • The SelectionModel is nothing more than a wrapper around a list of model objects.
  • ContactsPresenter holds on to an instance of this class
  • onItemSelected
  • Having the ColumnDefinition create a new widget for each cell is too heavy
  • Replace our FlexTable implementation with an HTML widget
  • calling setHTML()
  • Reduce the event overhead by sinking events on the HTML widget
  • rather than the individual cells
  • update our ContactsView.ui.xml file to use a
  • HTML widget rather than a FlexTable widget.
  • <g:HTML ui:field="contactsTable">
  • Inefficiencies related to inserting new elements via DOM manipulation Overhead associated with sinking events per Widget
  • for each item ask our column definitions to render accordingly
  • each column definition
  • render itself into the StringBuilder
  • rather than passing back a full-on widget
  • calling setHTML on a HTML widget
  • rather than calling setWidget on a FlexTable.
  • This will decrease your load time, especially as your tables start to grow.
  • we're reducing the overhead of sinking events on per-cell widgets
  • instead sinking on a single container
  • ClickEvents are still wired up via our UiHandler annotations
  • get the Element that was clicked on
  • and walk the DOM until we find a parent TableCellElement
  • we can determine the row
  • shouldFirdClickEvent() and shouldFireSelectEvent()
  • to take as a parameter a TableCellElement rather than a HTMLTable.Cell.
  • faster startup times via Code Splitting.
  • runAsync() points
  • split portion of your code is purely segmented
  • not referenced by other parts of the app
  • it will be downloaded and executed at the point that it needs to run
  • Do we really want to download all of that code before the user even logs in?
  • Not really.
  • simply grab the login code, and leave the rest for when we actually need it
  • wrap the code that creates the ContactsView and ContactsPresenter in a runAsync() call
  • as optimizations such as this one become easier and easier to implement.
Rem PC

The Best Remote PC Support I Ever Had - 1 views

The Remote PC Support Now excellent remote PC support services are the best. They have skilled computer tech professionals who can fix your PC while you wait or just go back to work or just simply...

remote PC support

started by Rem PC on 12 Sep 11 no follow-up yet
Hendy Irawan

enunciate - 0 views

  •  
    "Enunciate is an engine for dramatically enhancing your Java Web service API. It's simple. You develop your Web service API using standard Java technologies and attach Enunciate to your build process. Suddenly, your Web service API is boasting some pretty impressive features: Full HTML documentation of your services, scraped from your JavaDocs. Client-side libraries (e.g. Java, .NET, iPhone, Ruby, Flex, AJAX, GWT, etc.) for developers who want to interface with your API. Interface Definition Documents (e.g. WSDL, XML-Schema, etc.) Etc."
Hendy Irawan

Playing with AtomPub on CRX « contentGoesHere - 0 views

  •  
    " The primary purpose of the JcrCollectionAdapter class is to equip a stand-alone Atom server with a JCR repository for storage. However, with a bit of tweaking the class can also be used to provide an Atom interface to an existing CRX repository: a simple way to get things running is to leave the existing CRX Quickstart untouched and connect to the repository through RMI. RMI is disabled by default, but on CRX's Knowledge Base is an article how to enable it. "
Hendy Irawan

Apache Abdera - 0 views

  •  
    "The goal of the Apache Abdera project is to build a functionally-complete, high-performance implementation of the IETF Atom Syndication Format (RFC 4287) and Atom Publishing Protocol (RFC 5023) specifications."
Hendy Irawan

AtomPub interface for Guvnor - JBoss Community - 0 views

  •  
    "http://www.atompub.org/ defines a simple interface over HTTP to publish and subscribe to artifacts (files) and collections of artifacts (services/packages). AtomPub interface serves following purposes: 1: provide "feeds" for people/systems to monitor for changes: For example, user subscribes to a feed which lists contents of package or user subscribes to feed which lists changed contents in a package 2. provide the default remote api to push/pull content and meta data from the repository. This allows other applications to integrate with Guvnor by accessing repository content via atom pub programmatically."
1 - 20 of 21 Next ›
Showing 20 items per page