de.msponer.android.yac.activities.workqueues
Class WorkListActivity

java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by android.app.ListActivity
                      extended by de.msponer.android.yac.activities.workqueues.WorkListActivity
All Implemented Interfaces:
ComponentCallbacks, KeyEvent.Callback, LayoutInflater.Factory, View.OnCreateContextMenuListener, Window.Callback
Direct Known Subclasses:
SearchResultListActivity, TabAllocatedActivity, TabOfferedActivity, TabStartedActivity, TabSuspendedActivity

public class WorkListActivity
extends ListActivity

(Super-)Activity for YAC Work-Queues. Used by all work queue tabs and by the SearchResultActivity.

Author:
msponer

Field Summary
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
WorkListActivity()
           
 
Method Summary
 SectionedWorkListAdapter createWorkItemAdapter()
          Initializes the sectioned work list adapter.
 com.j256.ormlite.dao.Dao<MobileWorkItem,Integer> getMobileWorkItemDao()
          Returns the mobile work item dao.
 int getRequestCode()
          Return the current request code.
 String getSearchPattern()
          Returns the current search pattern.
 MobileWorkItem getSelectedItem()
          Returns the selected work item.
 SectionedWorkListAdapter getWorkItemAdapter()
          Return the sectioned work item adapter.
 List<MobileWorkItem> getWorkitemList()
          Returns the current work item list.
 ListView getWorkqueueListView()
          Returns the current work queue list view.
protected  void onCreate(Bundle savedInstanceState)
           
protected  void onDestroy()
           
protected  void onResume()
           
 void removeSelectedWorkItem()
          Removes the selected work item from the queue.
 void setMobileWorkItemDao(com.j256.ormlite.dao.Dao<MobileWorkItem,Integer> mobileWorkItemDao)
          Sets the current mobile work item dao.
 void setRequestCode(int requestCode)
          Sets the current request code.
 void setSearchPattern(String searchPattern)
          Sets the current search pattern.
 void setSelectedItem(MobileWorkItem selectedItem)
          Sets the selected work item.
 void setWorkItemAdapter(SectionedWorkListAdapter workItemAdapter)
          Sets the sectioned work item adapter.
 void setWorkitemList(List<MobileWorkItem> workitemList)
          Sets the current work item list.
 void setWorkqueueListView(ListView workqueueListView)
          Sets the current work queue lis view.
 void startWorkItemActivity(String intentAction)
          Starts the WorkItemActivity and passes the specified intent actions.
 
Methods inherited from class android.app.ListActivity
getListAdapter, getListView, getSelectedItemId, getSelectedItemPosition, onContentChanged, onListItemClick, onRestoreInstanceState, setListAdapter, setSelection
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, hasWindowFocus, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onActivityResult, onApplyThemeResource, onAttachedToWindow, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPause, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestart, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, showDialog, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderForResult, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
attachBaseContext, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkListActivity

public WorkListActivity()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)
Overrides:
onCreate in class Activity

onResume

protected void onResume()
Overrides:
onResume in class Activity

onDestroy

protected void onDestroy()
Overrides:
onDestroy in class ListActivity

removeSelectedWorkItem

public void removeSelectedWorkItem()
Removes the selected work item from the queue.


createWorkItemAdapter

public SectionedWorkListAdapter createWorkItemAdapter()
Initializes the sectioned work list adapter. Work item are sorted by date and grouped by start day.

Returns:
The sectioned work list apdapter.

startWorkItemActivity

public void startWorkItemActivity(String intentAction)
Starts the WorkItemActivity and passes the specified intent actions.

Parameters:
intentAction - The intent action.

getRequestCode

public int getRequestCode()
Return the current request code.

Returns:
The request code.

setRequestCode

public void setRequestCode(int requestCode)
Sets the current request code.

Parameters:
requestCode - The request code to set.

getSelectedItem

public MobileWorkItem getSelectedItem()
Returns the selected work item.

Returns:
The selected work item.

setSelectedItem

public void setSelectedItem(MobileWorkItem selectedItem)
Sets the selected work item.

Parameters:
selectedItem - The work item to select.

getMobileWorkItemDao

public com.j256.ormlite.dao.Dao<MobileWorkItem,Integer> getMobileWorkItemDao()
Returns the mobile work item dao.

Returns:
The current mobile work item.

setMobileWorkItemDao

public void setMobileWorkItemDao(com.j256.ormlite.dao.Dao<MobileWorkItem,Integer> mobileWorkItemDao)
Sets the current mobile work item dao.

Parameters:
mobileWorkItemDao - The mobile work item dao to set.

setSearchPattern

public void setSearchPattern(String searchPattern)
Sets the current search pattern.

Parameters:
searchPattern - The search pattern to set.

getSearchPattern

public String getSearchPattern()
Returns the current search pattern.

Returns:
The current search pattern.

setWorkItemAdapter

public void setWorkItemAdapter(SectionedWorkListAdapter workItemAdapter)
Sets the sectioned work item adapter.

Parameters:
workItemAdapter - The sectioned work item adpater.

getWorkItemAdapter

public SectionedWorkListAdapter getWorkItemAdapter()
Return the sectioned work item adapter.

Returns:
The sectioned work item adapter.

setWorkitemList

public void setWorkitemList(List<MobileWorkItem> workitemList)
Sets the current work item list.

Parameters:
workitemList - The current work item list.

getWorkitemList

public List<MobileWorkItem> getWorkitemList()
Returns the current work item list.

Returns:
The current work item list.

setWorkqueueListView

public void setWorkqueueListView(ListView workqueueListView)
Sets the current work queue lis view.

Parameters:
workqueueListView - The work queue list view to set.

getWorkqueueListView

public ListView getWorkqueueListView()
Returns the current work queue list view.

Returns:
The current work queue list view.