Android Open Source - VolleyJoomla J Article Details Request






From Project

Back to project page VolleyJoomla.

License

The source code is released under:

Apache License

If you think the Android project VolleyJoomla listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.ewackernagel.volley.joomla;
/*w  ww . j  a  va  2 s  .com*/
import java.util.HashMap;
import java.util.Map;

import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;

import de.ewackernagel.volley.joomla.pojos.JArticle;
import de.ewackernagel.volley.joomla.pojos.JConfiguration;

public class JArticleDetailsRequest extends GsonJRequest<JArticle> {
  private static final String PARAMETER_ARTICLE_ID = "artid";
  
  private static final String URL_TASK_SEGMENT = "api/content.php?task=getarticle";

  public JArticleDetailsRequest(JConfiguration configuration, JArticle jArticle, Listener<JArticle> successListener, ErrorListener errorListener) {
    this(configuration, jArticle.getId(), successListener, errorListener);
  }
  
  public JArticleDetailsRequest(JConfiguration configuration, long jArticleId, Listener<JArticle> successListener, ErrorListener errorListener) {
    super(configuration, URL_TASK_SEGMENT, JArticle.class, buildParams( jArticleId ), null, successListener,  errorListener);
  }

  private static Map<String, String> buildParams( long jArticleId) {
    final Map<String, String> params = new HashMap<String, String>( 1 );
    params.put( PARAMETER_ARTICLE_ID, String.valueOf( jArticleId ) );
    return params;
  }

}




Java Source Code List

de.ewackernagel.volley.joomla.GsonJRequest.java
de.ewackernagel.volley.joomla.JArticleDetailsRequest.java
de.ewackernagel.volley.joomla.JArticlesRequest.java
de.ewackernagel.volley.joomla.JCategoriesRequest.java
de.ewackernagel.volley.joomla.JLoginRequest.java
de.ewackernagel.volley.joomla.JRequest.java
de.ewackernagel.volley.joomla.pojos.JArticle.java
de.ewackernagel.volley.joomla.pojos.JCategory.java
de.ewackernagel.volley.joomla.pojos.JConfiguration.java
de.ewackernagel.volley.joomla.pojos.JWebsite.java