it.tidalwave.bluebill.mobile.observation.ObservationUIController Maven / Gradle / Ivy
/***********************************************************************************************************************
*
* blueBill Mobile - open source birdwatching
* ==========================================
*
* Copyright (C) 2009, 2010 by Tidalwave s.a.s. (http://www.tidalwave.it)
* http://bluebill.tidalwave.it/mobile/
*
***********************************************************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
***********************************************************************************************************************
*
* $Id: ObservationUIController.java,v f5730524d15c 2010/07/06 12:22:50 fabrizio $
*
**********************************************************************************************************************/
package it.tidalwave.bluebill.mobile.observation;
import it.tidalwave.mobile.util.ProgressListener;
import it.tidalwave.mobile.util.ProgressListenerSupport;
import javax.annotation.Nonnull;
import it.tidalwave.bluebill.observation.ObservationItem;
/***********************************************************************************************************************
*
* The controller for all the activities related to the {@link ObservationUI}.
*
* @author Fabrizio Giudici
* @version $Id: $
*
**********************************************************************************************************************/
public interface ObservationUIController
{
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
public static class ShareOptions
{
private boolean kmlAttachment = false;
@Nonnull
protected ProgressListener progressListener = new ProgressListenerSupport();
public void setKmlAttachment (final boolean kmlAttachment)
{
this.kmlAttachment = kmlAttachment;
}
public boolean isKmlAttachment()
{
return kmlAttachment;
}
public void setProgressListener (final @Nonnull ProgressListener progressListener)
{
this.progressListener = progressListener;
}
@Nonnull
public ProgressListener getProgressListener()
{
return progressListener;
}
@Override @Nonnull
public String toString()
{
return String.format("ShareOptions[kmlAttachment=%s progressListener=%s]", kmlAttachment, progressListener);
}
}
/*******************************************************************************************************************
*
* Starts the sequence of operations for adding a new observation.
*
******************************************************************************************************************/
public void startNewObservationSequence();
/*******************************************************************************************************************
*
* Commits the temporary data accumulated so far into a new observation.
*
******************************************************************************************************************/
public void commitNewObservation();
/*******************************************************************************************************************
*
* Cancels any temporary data for a new observation.
*
******************************************************************************************************************/
public void cancelNewObservation();
/*******************************************************************************************************************
*
* Deletes all the observations stored in memory.
*
******************************************************************************************************************/
public void deleteAllObservations();
/*******************************************************************************************************************
*
* Deletes the specific {@link ObservationItem}.
*
* @param observationItem the item to delete
*
******************************************************************************************************************/
public void deleteObservationItem (@Nonnull ObservationItem observationItem);
/*******************************************************************************************************************
*
* Shares the observation items stored in memory.
*
******************************************************************************************************************/
public void shareObservations (@Nonnull ShareOptions options);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy