2010-04-16 23:32:17 -04:00
|
|
|
/**
|
2010-04-29 00:59:14 -04:00
|
|
|
*
|
2010-04-16 23:32:17 -04:00
|
|
|
*/
|
|
|
|
package com.fsck.k9;
|
|
|
|
|
2010-04-21 22:20:35 -04:00
|
|
|
import java.io.Serializable;
|
2010-04-16 23:32:17 -04:00
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import com.fsck.k9.mail.Flag;
|
|
|
|
|
2010-04-21 22:20:35 -04:00
|
|
|
public class SearchAccount implements BaseAccount, SearchSpecification, Serializable
|
2010-04-16 23:32:17 -04:00
|
|
|
{
|
|
|
|
private Flag[] mRequiredFlags = null;
|
|
|
|
private Flag[] mForbiddenFlags = null;
|
|
|
|
private String email = null;
|
|
|
|
private String description = null;
|
|
|
|
private String query = "";
|
|
|
|
private boolean integrate = false;
|
2010-12-24 17:48:19 -05:00
|
|
|
private String mUuid = null;
|
2010-04-21 22:20:35 -04:00
|
|
|
private boolean builtin = false;
|
|
|
|
private String[] accountUuids = null;
|
2010-04-24 15:10:57 -04:00
|
|
|
private String[] folderNames = null;
|
2010-04-29 00:59:14 -04:00
|
|
|
|
2010-04-21 22:20:35 -04:00
|
|
|
public SearchAccount(Preferences preferences)
|
|
|
|
{
|
2010-04-29 00:59:14 -04:00
|
|
|
|
2010-04-21 22:20:35 -04:00
|
|
|
}
|
|
|
|
protected synchronized void delete(Preferences preferences)
|
|
|
|
{
|
2010-04-29 00:59:14 -04:00
|
|
|
|
2010-04-21 22:20:35 -04:00
|
|
|
}
|
2010-04-29 00:59:14 -04:00
|
|
|
|
2010-04-21 22:20:35 -04:00
|
|
|
public synchronized void save(Preferences preferences)
|
|
|
|
{
|
2010-04-29 00:59:14 -04:00
|
|
|
|
2010-04-21 22:20:35 -04:00
|
|
|
}
|
2010-04-29 00:59:14 -04:00
|
|
|
|
|
|
|
|
2010-04-16 23:32:17 -04:00
|
|
|
public SearchAccount(Context context, boolean nintegrate, Flag[] requiredFlags, Flag[] forbiddenFlags)
|
|
|
|
{
|
|
|
|
mRequiredFlags = requiredFlags;
|
|
|
|
mForbiddenFlags = forbiddenFlags;
|
|
|
|
integrate = nintegrate;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public synchronized String getEmail()
|
|
|
|
{
|
|
|
|
return email;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public synchronized void setEmail(String email)
|
|
|
|
{
|
|
|
|
this.email = email;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Flag[] getRequiredFlags()
|
|
|
|
{
|
|
|
|
return mRequiredFlags;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Flag[] getForbiddenFlags()
|
|
|
|
{
|
|
|
|
return mForbiddenFlags;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isIntegrate()
|
|
|
|
{
|
|
|
|
return integrate;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDescription()
|
|
|
|
{
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDescription(String description)
|
|
|
|
{
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getQuery()
|
|
|
|
{
|
|
|
|
return query;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setQuery(String query)
|
|
|
|
{
|
|
|
|
this.query = query;
|
|
|
|
}
|
|
|
|
public String getUuid()
|
|
|
|
{
|
2010-12-24 17:48:19 -05:00
|
|
|
if(mUuid == null )
|
|
|
|
{
|
|
|
|
setUuid( UUID.randomUUID().toString());
|
|
|
|
}
|
2010-04-16 23:32:17 -04:00
|
|
|
return mUuid;
|
|
|
|
}
|
|
|
|
public void setUuid(String nUuid)
|
|
|
|
{
|
|
|
|
mUuid = nUuid;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setIntegrate(boolean integrate)
|
|
|
|
{
|
|
|
|
this.integrate = integrate;
|
|
|
|
}
|
2010-04-21 22:20:35 -04:00
|
|
|
|
|
|
|
public boolean isBuiltin()
|
|
|
|
{
|
|
|
|
return builtin;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setBuiltin(boolean builtin)
|
|
|
|
{
|
|
|
|
this.builtin = builtin;
|
|
|
|
}
|
|
|
|
public String[] getAccountUuids()
|
|
|
|
{
|
|
|
|
return accountUuids;
|
|
|
|
}
|
|
|
|
public void setAccountUuids(String[] accountUuids)
|
|
|
|
{
|
|
|
|
this.accountUuids = accountUuids;
|
|
|
|
}
|
2010-04-24 15:10:57 -04:00
|
|
|
@Override
|
|
|
|
public String[] getFolderNames()
|
|
|
|
{
|
|
|
|
return folderNames;
|
|
|
|
}
|
|
|
|
public void setFolderNames(String[] folderNames)
|
|
|
|
{
|
|
|
|
this.folderNames = folderNames;
|
|
|
|
}
|
2010-04-16 23:32:17 -04:00
|
|
|
}
|