org.musicontroller.gui.edit
Class CoverArtEdit
java.lang.Object
org.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.BaseComponent
org.apache.tapestry.AbstractPage
org.apache.tapestry.html.BasePage
org.musicontroller.gui.edit.CoverArtEdit
- All Implemented Interfaces:
- org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IDirectEvent, org.apache.tapestry.IExternalPage, org.apache.tapestry.internal.Component, org.apache.tapestry.IPage, org.apache.tapestry.IRender, org.apache.tapestry.ITemplateComponent
public abstract class CoverArtEdit
- extends org.apache.tapestry.html.BasePage
- implements org.apache.tapestry.IExternalPage
Implements the MusiController cover art edit screen. The functions of this screen:
- Change the cover art of a playlist, by selecting the new cover art image from a list.
- Upload a cover art image for a playlist. The uploaded image becomes the new cover art image.
In additon, this screen provides:
- A link to the playlist edit screen of the playlist.
- A picture of the current cover art.
This page receives parameters as External page link parameters. These are:
- The playlistid, this can be null in case of a non-persistent playlist. If not null,
the search criteria for the cover art search are queried from this playlist.
- The name of the return page. This page will render the named page when a cover is
selected.
- A band name, and -
- A playlist name. The band name and playlist name are used as search criteria if the playlist
id is null.
- Version:
- $Id: CoverArtEdit.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $
- Author:
- Hans Drexler
Fields inherited from class org.apache.tapestry.AbstractComponent |
_body, _bodyCount |
Methods inherited from class org.apache.tapestry.html.BasePage |
getResponseContentType |
Methods inherited from class org.apache.tapestry.AbstractPage |
addPageAttachListener, addPageBeginRenderListener, addPageDetachListener, addPageEndRenderListener, addPageValidateListener, attach, beginPageRender, cleanupAfterRender, detach, endPageRender, firePageAttached, firePageBeginRender, firePageDetached, firePageEndRender, firePageValidate, getChangeObserver, getEngine, getExtendedId, getIdPath, getLocale, getNestedComponent, getOutputEncoding, getPageName, getRequestCycle, hasFormComponents, hasWidgets, removePageAttachListener, removePageBeginRenderListener, removePageDetachListener, removePageEndRenderListener, removePageValidateListener, renderPage, setChangeObserver, setHasFormComponents, setHasWidgets, setLocale, setPageName, validate |
Methods inherited from class org.apache.tapestry.BaseComponent |
addOuter, finishLoad, getContainedRenderers, getInnerRenderers, renderComponent |
Methods inherited from class org.apache.tapestry.AbstractComponent |
addAsset, addBody, addComponent, checkActiveLock, enterActiveState, equals, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getId, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent |
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
getLocation, setLocation |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tapestry.IPage |
addPageAttachListener, addPageBeginRenderListener, addPageDetachListener, addPageEndRenderListener, addPageValidateListener, attach, beginPageRender, detach, endPageRender, firePageAttached, getChangeObserver, getEngine, getLocale, getNestedComponent, getPageName, getPropertyChangeObserver, getRequestCycle, getResponseContentType, hasFormComponents, hasWidgets, removePageAttachListener, removePageBeginRenderListener, removePageDetachListener, removePageEndRenderListener, removePageValidateListener, renderPage, setChangeObserver, setHasFormComponents, setHasWidgets, setLocale, setPageName, validate |
Methods inherited from interface org.apache.tapestry.IComponent |
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
Methods inherited from interface org.apache.tapestry.IRender |
render |
Methods inherited from interface org.apache.hivemind.LocationHolder |
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
getLocation |
CoverArtEdit
public CoverArtEdit()
getPlaylistId
public abstract long getPlaylistId()
setPlaylistId
public abstract void setPlaylistId(long id)
setPlaylistName
public abstract void setPlaylistName(java.lang.String playlistname)
getPlaylistName
public abstract java.lang.String getPlaylistName()
setBandName
public abstract void setBandName(java.lang.String bandname)
getBandName
public abstract java.lang.String getBandName()
getPlaylist
public abstract Playlist getPlaylist()
setPlaylist
public abstract void setPlaylist(Playlist playlist)
getReturnPage
public abstract java.lang.String getReturnPage()
setReturnPage
public abstract void setReturnPage(java.lang.String returnPage)
getUploadFile
public abstract org.apache.tapestry.request.IUploadFile getUploadFile()
getMcService
public abstract McService getMcService()
setCoverArtCandidate
public abstract void setCoverArtCandidate(CoverArtSearchResult index)
getCoverArtCandidate
public abstract CoverArtSearchResult getCoverArtCandidate()
getExternalService
@InjectObject(value="engine-service:external")
public abstract org.apache.tapestry.engine.IEngineService getExternalService()
activateExternalPage
public void activateExternalPage(java.lang.Object[] args,
org.apache.tapestry.IRequestCycle cycle)
- Interpret the parameters passed to this page. The page has 2 parameters:
- playlistid - The Id of the playlist whose cover art is edited. This parameter
can be null, in whcih case the playlist is not persistent (yet).
- returnpage - This is the name of the tapestry page to use as return page.
- Specified by:
activateExternalPage
in interface org.apache.tapestry.IExternalPage
uploadCoverArt
public void uploadCoverArt()
- The user uploads a cover art image.
getCoverArtList
public java.util.Collection<CoverArtSearchResult> getCoverArtList()
- Ask the Mc Service to return a list of possible cover art for this
playlist.
- Returns:
- A list of cover art candidates for persistent playlists.
selectCoverArt
public org.apache.tapestry.engine.ILink selectCoverArt(org.apache.tapestry.IRequestCycle cycle,
CoverArtSearchResult selected)
- Set the selected image as the cover art image for the playlist if the playlist is persistent.
Returns to the page passed to coverArtedit by the returnPage
property. Sets the playlistId
and the coverArt
property on the return page before returning.
- Parameters:
cycle
- The Tapestry MVC cycle.selected
- The selected cover art image.
isPersistentPlaylist
public boolean isPersistentPlaylist()
- Tests if a persistent playlist is loaded in this page.
- Returns:
- True if a persistent playlist is loaded, otherwise false.
getHeight
public int getHeight()
- Returns:
- The height for the currently displayed searchresult, taking into
account that the maximum width is 400px.
getWidth
public int getWidth()
- Returns:
- The width for the currently displayed searchresult, taking into
account that the maximum width is 400px.
Copyright © 2010 A.J.V.. All Rights Reserved.