public void refresh() { m_Container.doJSONRequest( G3Viewer.VIEW_ITEM_URL + getId(), new HttpSuccessHandler() { @Override public void success(JSONValue aValue) { updateValues(aValue); } }, false, true); }
public void select() { Loading.getInstance().loading("Loading Contents.."); m_Container.doJSONRequest( G3Viewer.VIEW_CHILDREN_URL + getId(), new HttpSuccessHandler() { @Override public void success(JSONValue aValue) { viewAlbum(aValue); } }, false, true); }
/* * Fetch the requested URL. */ public void expand() { m_Container.doJSONRequest( G3Viewer.VIEW_ALBUM_URL + getId(), new HttpSuccessHandler() { @Override public void success(JSONValue aValue) { addAlbums(aValue); } }, false, true); }
/** moves the given array of ids to this album */ public void moveTo(JSONArray a_Ids) { Loading.getInstance().loading("Moving Items.."); m_Container.doJSONRequest( G3Viewer.MOVE_TO_ALBUM_URL + getId() + "?sourceids=" + a_Ids.toString(), new HttpSuccessHandler() { @Override public void success(JSONValue aValue) { expand(); m_View.getCurrentAlbum().expand(); m_View.getCurrentAlbum().select(); } }, true, true); }
/** rearranges the albums */ public void rearrangeTo(JSONArray a_Ids, Item m_CompareTo, boolean m_Before) { Loading.getInstance().loading("Re-arranging.."); String bora = m_Before ? "before" : "after"; m_Container.doJSONRequest( G3Viewer.REARRANGE_URL + m_CompareTo.getID() + "/" + bora + "?sourceids=" + a_Ids.toString(), new HttpSuccessHandler() { @Override public void success(JSONValue aValue) { m_View.getCurrentAlbum().select(); } }, true, true); }
public void uploadFiles(final File[] files) { m_Container.doJSONRequest( G3Viewer.RESIZE_DETAILS_URL, new HttpSuccessHandler() { public void success(JSONValue a_Value) { JSONObject jso = a_Value.isObject(); if (jso != null) { ResizeOptions ro = new ResizeOptions(jso); UploadFile uf; for (File file : files) { uf = m_UploadControl.createUploadFile(Album.this, file, ro); m_AllUploads.add(uf); m_View.addToView(uf); } m_Container.updateInformation(); } } }, false, true); }