Commit 8c90a4cc by Lee Jaebin

ソース分離

parent 3e307bda
......@@ -20,12 +20,10 @@ import jp.agentec.abook.abv.bl.acms.client.json.CategoriesJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ContentCheckDeliverableJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ContentSetJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ContentVersionsJSON;
import jp.agentec.abook.abv.bl.acms.client.json.DashboardsJSON;
import jp.agentec.abook.abv.bl.acms.client.json.GetBackupFileListJSON;
import jp.agentec.abook.abv.bl.acms.client.json.GroupsJSON;
import jp.agentec.abook.abv.bl.acms.client.json.LogSendFlagJSON;
import jp.agentec.abook.abv.bl.acms.client.json.NewAppStoreLoginJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ReaderShareUrlJSON;
import jp.agentec.abook.abv.bl.acms.client.json.RequirePasswordChangeJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ResultJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ServerTimeZoneJSON;
......@@ -44,13 +42,11 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.AddMemberGroupParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.AppStoreNewLoginParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.BackgroundPicParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.CheckSendLogParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ContentDownloadLogParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ContentReadingLogParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.ContentSearchParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.EnqueteReplyParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.EnterpriseLoginParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.EnterpriseNewLoginParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.FetchDateParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetBackupFileParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetContentParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetEnqueteReplyParameters;
......@@ -72,7 +68,6 @@ import jp.agentec.abook.abv.bl.acms.type.LoginStatus;
import jp.agentec.abook.abv.bl.acms.type.RequirePasswordChangeCode;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Constant.ExceptionDetailMessage;
import jp.agentec.abook.abv.bl.common.Constant.ReaderConstant;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
......@@ -82,18 +77,14 @@ import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.common.nw.NetworkAdapter;
import jp.agentec.abook.abv.bl.common.util.SecurityUtil;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.MemberInfoDao;
import jp.agentec.abook.abv.bl.dto.CategoryDto;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.DashboardDto;
import jp.agentec.abook.abv.bl.dto.GroupDto;
import jp.agentec.abook.abv.bl.dto.MemberInfoDto;
import jp.agentec.abook.abv.bl.dto.ServiceOptionDto;
import jp.agentec.abook.abv.bl.dto.SubscriptionDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.SiteLogic;
import jp.agentec.adf.net.http.HttpDownloadState;
import jp.agentec.adf.net.http.HttpFileDownloader;
import jp.agentec.adf.net.http.HttpMultipart;
......@@ -648,19 +639,6 @@ public class AcmsClient implements AcmsClientResponseListener {
return json.result;
}
public ArrayList<DashboardDto> getDashboardList(AcmsParameters param) throws AcmsException, NetworkDisconnectedException {
HttpResponse response = send(AcmsApis.ApiUrlDashboard, param);
DashboardsJSON json = new DashboardsJSON(response.httpResponseBody);
lastPresentTime = json.presentTime;
return json.dashboardList;
}
//天気予報の情報を取得
public String getWeatherInfor(AcmsParameters param ) throws AcmsException, NetworkDisconnectedException {
HttpResponse response = send(AcmsApis.ApiGetWeather, param);
return response.httpResponseBody;
}
// TODO: リファクタリングの結果をABook+ブランチにも反映
public String enqueteReply(EnqueteReplyParameters postParam, GetEnqueteReplyParameters getParam) throws AcmsException, NetworkDisconnectedException {
......@@ -706,14 +684,6 @@ public class AcmsClient implements AcmsClientResponseListener {
return json.result;
}
public ReaderShareUrlJSON getReaderShareUrl(ReaderShareParameters param) throws AcmsException, NetworkDisconnectedException {
HttpResponse response = send(AcmsApis.ApiUrlGetReaderShareUrl, param);
ReaderShareUrlJSON json = new ReaderShareUrlJSON(response.httpResponseBody);
Logger.d(TAG, "json : %s", json);
return json;
}
public SubscriptionHistoryJSON getSubscriptionHistory(SubscriptionHistoryParameters param) throws AcmsException, NetworkDisconnectedException {
HttpResponse response = send(AcmsApis.ApiUrlGetSubscriptionHistory, param);
SubscriptionHistoryJSON json = new SubscriptionHistoryJSON(response.httpResponseBody);
......@@ -1199,11 +1169,9 @@ public class AcmsClient implements AcmsClientResponseListener {
AcmsApis.ApiUrlContentReadingLog,
AcmsApis.ApiUrlAddMemberGroup,
AcmsApis.ApiUrlContentVersion,
AcmsApis.ApiUrlScheduleList,
AcmsApis.ApiUrlGetUserGroupList,
AcmsApis.ApiUrlNewAppStoreLogin,
AcmsApis.ApiUrlAppStoreNewLogin,
AcmsApis.ApiUrlKtLogin,
AcmsApis.ApiGetPushMessages,
AcmsApis.ApiSendPushMessage
};
......
package jp.agentec.abook.abv.bl.acms.client.json;
import java.util.ArrayList;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
import jp.agentec.abook.abv.bl.dto.DashboardDto;
import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
/**
* {@link AcmsClient#getDashboardList}
* @author cym
* @version 1.0.0
*/
public class DashboardsJSON extends AcmsCommonJSON {
public static final String DashboardList = "dashboardList";
public static final String Type = "type";
public static final String Status = "status";
public static final String DispOrder = "dispOrder";
public static final String GenreId = "genreId";
public ArrayList<DashboardDto> dashboardList;
public DashboardsJSON(String jsonString) throws AcmsException {
super(jsonString);
}
@Override
protected void parse(JSONObject json) throws JSONValidationException {
if (json.has(DashboardList)) {
JSONArray jarr = json.getJSONArray(DashboardList);
int count = jarr.length();
dashboardList = new ArrayList<DashboardDto>();
for (int i = 0; i < count; i++) {
JSONObject dashboard = jarr.getJSONObject(i);
String type = getString(dashboard, Type);
int status = getInt(dashboard, Status);
int dispOrder = getInt(dashboard, DispOrder);
int genreId = -1;
if(dashboard.has(GenreId)){
genreId = getInt(dashboard, GenreId);
}
dashboardList.add(new DashboardDto(type, status, dispOrder, genreId));
}
} else {
throw new JSONValidationException(json.toString(), DashboardList + " property not found.");
}
}
}
package jp.agentec.abook.abv.bl.acms.client.json;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
import org.json.adf.JSONObject;
public class ReaderShareUrlJSON extends AcmsJSONParser {
public static final String HttpStatus = "httpStatus";
public static final String Url = "url";
public static final String ErrorMessage = "errorMessage";
public static final String LoginErrorMessage = "loginErrorMessage";
public String shareUrl;
public boolean isSuccess;
public String errorMessage;
public ReaderShareUrlJSON(String jsonString) throws AcmsException {
super(jsonString);
}
@Override
protected void parse(JSONObject json) throws JSONValidationException {
if (json.getInt(HttpStatus) == 200) {
shareUrl = json.getString(Url);
isSuccess = true;
} else {
errorMessage = json.getString(LoginErrorMessage); // Localeに合わせたメッセージ
}
}
}
......@@ -13,7 +13,6 @@ import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.bl.dto.TaskReportDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
/**
* Created by seo-y on 2018/12/19.
......
......@@ -4,7 +4,6 @@ import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import jp.agentec.abook.abv.bl.acms.client.json.AcmsCommonJSON;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
......
package jp.agentec.abook.abv.bl.acms.client.json.reader;
import jp.agentec.abook.abv.bl.acms.client.json.AcmsCommonJSON;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
import org.json.adf.JSONException;
import org.json.adf.JSONObject;
public class ReaderContentJSON extends AcmsCommonJSON {
public int siteId;
public int contractId;
public long cmsContentId;
public int contractContentId;
public String downloadUrl;
public String contentVersionUrl;
public String errorMessage;
public String shortUrl;
public ReaderContentJSON(String jsonString, String shortUrl) throws AcmsException {
super(jsonString);
this.shortUrl = shortUrl;
}
@Override
protected void parse(JSONObject json) throws JSONException, JSONValidationException {
super.parse(json);
siteId = getInt(json, "siteId");
contractId = getInt(json, "contractId");
cmsContentId = getLong(json, "cmsContentId");
contractContentId = getInt(json, "contractContentId");
if (json.has("downloadUrl")) {
downloadUrl = getString(json, "downloadUrl");
}
if (json.has("contentVersionUrl")) {
contentVersionUrl = getString(json, "contentVersionUrl");
}
if (json.has("errorMessage")) {
errorMessage = json.getString("errorMessage");
}
}
}
package jp.agentec.abook.abv.bl.acms.client.json.reader;
import jp.agentec.abook.abv.bl.acms.client.json.AcmsCommonJSON;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
import jp.agentec.abook.abv.bl.common.util.JsonUtil;
import org.json.adf.JSONException;
import org.json.adf.JSONObject;
public class ReaderContentVersionJSON extends AcmsCommonJSON {
public Long contentId;
public String contentName;
public Integer contentType;
public Integer metaVersion;
public Integer resourceVersion;
public String exchangeMetaInfoDate;
public String exchangeResourceDate;
public String exchangeAATInfoDate;
public String exchangePdfDate;
public ReaderContentVersionJSON(String jsonString) throws AcmsException {
super(jsonString);
}
@Override
protected void parse(JSONObject json) throws JSONException, JSONValidationException {
super.parse(json);
contentId = JsonUtil.getLong(json, "contentId");
contentName = JsonUtil.getString(json, "contentName");
// 必須
metaVersion = getInt(json, "metaVersion");
contentType = JsonUtil.getInt(json, "contentType");
resourceVersion = JsonUtil.getInt(json, "resourceVersion");
exchangeMetaInfoDate = JsonUtil.getString(json, "exchangeMetaInfoDate");
exchangeResourceDate = JsonUtil.getString(json, "exchangeResourceDate");
exchangeAATInfoDate = JsonUtil.getString(json, "exchangeAATInfoDate");
exchangePdfDate = JsonUtil.getString(json, "exchangePdfDate");
}
}
package jp.agentec.abook.abv.bl.acms.client.json.reader;
import java.util.ArrayList;
import java.util.Date;
import jp.agentec.abook.abv.bl.acms.client.json.AcmsCommonJSON;
import jp.agentec.abook.abv.bl.common.Constant.ReaderConstant.ReceivePushMessage;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
import jp.agentec.abook.abv.bl.common.util.JsonUtil;
import jp.agentec.abook.abv.bl.dto.ContractDto;
import jp.agentec.abook.abv.bl.dto.SiteDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
/**
* RepositoryServerマスタ転送用
*
*/
public class SiteJSON extends AcmsCommonJSON {
public ArrayList<SiteDto> siteList;
public ArrayList<ContractDto> contractList;
public String errorMessage;
public SiteJSON(String jsonString) throws AcmsException {
super(jsonString);
}
@Override
protected void parse(JSONObject json) throws JSONValidationException {
super.parse(json);
if (json.has("site")) {
JSONArray jarr = json.getJSONArray("site");
int count = jarr.length();
if (count > 0) {
siteList = new ArrayList<SiteDto>();
for (int i = 0; i < count; i++) {
JSONObject site = jarr.getJSONObject(i);
int siteId = getInt(site, "siteId");
String siteUrl = getString(site, "siteUrl");
String siteName = getString(site, "siteName");
String downloadUrl = getString(site, "downloadUrl");
String logSendUrl = JsonUtil.getString(site, "logSendUrl");
String enqueteSendUrl = JsonUtil.getString(site, "enqueteSendUrl");
int delFlg = getInt(site, "delFlg");
Date insertDate = DateTimeUtil.toDate(getString(site,"insertDate"), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
Date updateDate = DateTimeUtil.toDate(getString(site,"updateDate"), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
siteList.add(new SiteDto(siteId, siteUrl, siteName, downloadUrl, logSendUrl, enqueteSendUrl, delFlg, insertDate, updateDate));
}
}
}
if (json.has("contract")) {
JSONArray jarr = json.getJSONArray("contract");
int count = jarr.length();
if (count > 0) {
contractList = new ArrayList<ContractDto>();
for (int i = 0; i < count; i++) {
JSONObject contract = jarr.getJSONObject(i);
int siteId = getInt(contract, "siteId");
int contractId = getInt(contract, "contractId");
String companyName = getString(contract, "companyName");
String urlPath = getString(contract, "urlPath");
String undeliverableDelete = getString(contract, "undeliverableDelete");
String usablePushMessage = getString(contract, "usablePushMessage");
String usableReadinglogGps = getString(contract, "usableReadinglogGps");
String usableReadinglogObject = getString(contract, "usableReadinglogObject");
int delFlg = getInt(contract, "delFlg");
Date insertDate = DateTimeUtil.toDate(getString(contract, "insertDate"), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
Date updateDate = DateTimeUtil.toDate(getString(contract, "updateDate"), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
contractList.add(new ContractDto(siteId, contractId, companyName, urlPath, undeliverableDelete, usablePushMessage, usableReadinglogGps, usableReadinglogObject, delFlg, insertDate, updateDate, ReceivePushMessage.NOT_SET, null));
}
}
}
if (json.has("errorMessage")) {
errorMessage = json.getString(errorMessage);
}
}
}
......@@ -59,16 +59,6 @@ public class AcmsApis {
* @since 1.1.0
*/
public static final String ApiUrlEnterpriseNewLogin = "enterpriseNewLogin";
/**
* POSCO社専用のログイン
* @since 1.1.1
*/
public static final String ApiUrlPoscoLogin = "poscoLogin";
/**
* KT社専用のログイン
* @since 1.5.2KT
*/
public static final String ApiUrlKtLogin = "ktLogin";
/**
* ジャンル一覧ぼ取得
......@@ -121,11 +111,6 @@ public class AcmsApis {
*/
public static final String ApiUrlAppLatestVersion = "appLatestVersion";
/**
* ログインしたユーザのコンテンツの公開開始日が正しいか確認
* @since 1.0.0
*/
public static final String ApiUrlContentCheckDeliveryStartDate = "contentCheckDeliveryStartDate";
/**
* ログインしたユーザのコンテンツが公開されたか確認
* @since 1.0.0
*/
......@@ -176,12 +161,6 @@ public class AcmsApis {
//앙케이트 응답 내용을 서버에 송신
public static final String ApiUrlEnqueteReply = "enqueteReply";
//대쉬보드 리스트 수신
public static final String ApiUrlDashboard = "dashboard";
//サイネージスケジュールの取得
public static final String ApiUrlScheduleList = "scheduleList";
public static final String ApiUrlUploadLogFile = "uploadLogFile";
public static final String ApiUrlContentRegist = "contentRegist";
......@@ -190,14 +169,10 @@ public class AcmsApis {
public static final String ApiUrlAddMemberGroup = "addMemberGroup";
public static final String ApiUrlGetReaderShareUrl = "getReaderShareUrl";
public static final String ApiUrlContentSet = "contentSet";
public static final String ApiUrlGetSubscriptionHistory = "purchaseHistory/restore";
public static final String ApiUrlSendSubscriptionHistory = "purchaseHistory/register";
//天気予報の情報取得
public static final String ApiGetWeather = "getWeather";
// デバイストークン更新
public static final String ApiUrlUpdateDeviceToken = "updateDeviceToken";
......@@ -281,7 +256,7 @@ public class AcmsApis {
apiValue = Constant.ApiValue.nuapi;
}
if (methodName.equals(ApiUrlNewAppStoreLogin) || methodName.equals(ApiUrlAppStoreNewLogin) || methodName.equals(ApiUrlServerTime) || methodName.equals(ApiUrlServerTimeZone) || methodName.equals(ApiUrlKtLogin)) {
if (methodName.equals(ApiUrlNewAppStoreLogin) || methodName.equals(ApiUrlAppStoreNewLogin) || methodName.equals(ApiUrlServerTime) || methodName.equals(ApiUrlServerTimeZone)) {
apiValue = Constant.ApiValue.nuapi;
} else if (methodName.equals(ApiProjectList) || methodName.equals(ApiWorkerGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetProjectData) ||
methodName.equals(ApiGetTaskFile) || methodName.equals(ApiSceneEntry) || methodName.equals(ApiTaskContentEntry) ||
......
......@@ -10,7 +10,6 @@ import jp.agentec.abook.abv.bl.acms.type.DeliveryType;
import jp.agentec.abook.abv.bl.acms.type.LoginStatus;
import jp.agentec.abook.abv.bl.acms.type.SecurityPolicyType;
import jp.agentec.abook.abv.bl.acms.type.ServiceOption.ServiceOptionId;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Constant.ContractScale;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.common.util.SecurityUtil;
......@@ -26,8 +25,6 @@ import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.NumericUtil;
import jp.agentec.adf.util.StringUtil;
import static java.util.Calendar.MONTH;
// TODO: clone()使っているところは不要なので次のバージョンアップのタイミングで取る
public class ABVDataCache {
private static final String TAG = "Cache";
......@@ -430,15 +427,6 @@ public class ABVDataCache {
return deviceLocationMode;
}
public int getHomeMenuDefault() {
ServiceOptionDto dto = getServiceOption(ServiceOptionId.HomeMenuDefault);
int deviceLocationMode = 0;
if (dto != null) {
deviceLocationMode = NumericUtil.parseInt(dto.val);
}
return deviceLocationMode;
}
public boolean isUseGroup() {
return isServiceOptionEnable(ServiceOptionId.UseGroup);
}
......
......@@ -36,14 +36,9 @@ import jp.agentec.abook.abv.bl.data.tables.TContentTag;
import jp.agentec.abook.abv.bl.data.tables.TEnquete;
import jp.agentec.abook.abv.bl.data.tables.TFolder;
import jp.agentec.abook.abv.bl.data.tables.TInspectTaskReport;
import jp.agentec.abook.abv.bl.data.tables.TInteractiveInfo;
import jp.agentec.abook.abv.bl.data.tables.TLock;
import jp.agentec.abook.abv.bl.data.tables.TMarkingSetting;
import jp.agentec.abook.abv.bl.data.tables.TPlaylist;
import jp.agentec.abook.abv.bl.data.tables.TPlaylistDetail;
import jp.agentec.abook.abv.bl.data.tables.TProject;
import jp.agentec.abook.abv.bl.data.tables.TPushMessage;
import jp.agentec.abook.abv.bl.data.tables.TSchedule;
import jp.agentec.abook.abv.bl.data.tables.TSearchHistory;
import jp.agentec.abook.abv.bl.data.tables.TSubscriptionHistory;
import jp.agentec.abook.abv.bl.data.tables.TTask;
......@@ -86,7 +81,6 @@ public class ABVDataOpenHelper {
iTableScripts.add(new LContentPageReadingLog());
iTableScripts.add(new LContentObjectLog());
iTableScripts.add(new LContentCustomLog());
iTableScripts.add(new TLock());
iTableScripts.add(new MPasswordLockInfo());
iTableScripts.add(new TContentOldPdf());
iTableScripts.add(new TContentServerSearched());
......@@ -117,12 +111,6 @@ public class ABVDataOpenHelper {
iTableScripts.add(new TPushMessage());
iTableScripts.add(new TInspectTaskReport());
}
iTableScripts.add(new TPlaylist());
iTableScripts.add(new TPlaylistDetail());
iTableScripts.add(new TSchedule());
iTableScripts.add(new TInteractiveInfo());
return iTableScripts;
}
......
......@@ -66,14 +66,6 @@ public class AcmsDao extends AbstractDao {
update("update m_acms set last_announce_change_password_date=DATE('NOW','LOCALTIME')", null);
}
public String selectScheduleListLastFetchDate() {
String lastFetchDate = rawQueryGetString("select schedulelist_last_fetch_date from m_acms order by schedulelist_last_fetch_date desc limit 1", null);
if (lastFetchDate == null) {
return null;
}
return lastFetchDate;
}
public String selectContentVersionLastFetchDate() {
String lastFetchDate = rawQueryGetString("select contentversion_last_fetch_date from m_acms order by contentversion_last_fetch_date desc limit 1", null);
if (lastFetchDate == null) {
......
package jp.agentec.abook.abv.bl.data.dao;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.dto.BeaconHistoryDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
public class BeaconHistoryDao extends AbstractDao {
private static final String TAG = "BeaconHistoryDao";
/**
* {@link BeaconHistoryDao} のインスタンスを初期化します。
* @since 1.0.0
*/
/*package*/
BeaconHistoryDao() {
}
@Override
protected BeaconHistoryDto convert(Cursor cursor) {
BeaconHistoryDto dto = new BeaconHistoryDto();
int column = cursor.getColumnIndex("beacon_history_id");
if (column != -1) {
dto.beaconHistoryId = cursor.getInt(column);
}
column = cursor.getColumnIndex("major");
if (column != -1) {
dto.major = cursor.getInt(column);
}
column = cursor.getColumnIndex("minor");
if (column != -1) {
dto.minor = cursor.getInt(column);
}
column = cursor.getColumnIndex("insert_date");
if (column != -1) {
dto.insertDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
column = cursor.getColumnIndex("update_date");
if (column != -1) {
dto.updateDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
return dto;
}
public int getNewContentBeaconHistoryId() {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" COALESCE(MAX(beacon_history_id)+1,1)");
sql.append(" FROM t_beacon_history");
return rawQueryGetInt(sql.toString(), null);
}
public boolean exists(int major, int minor) {
return rawQueryGetString("select beacon_history_id from t_beacon_history where major=? and minor=?", new String[] { "" + major, "" + minor }) != null;
}
public void insert(BeaconHistoryDto dto) {
dto.beaconHistoryId = getNewContentBeaconHistoryId();
dto.insertDate = DateTimeUtil.getCurrentDate();
dto.updateDate = DateTimeUtil.getCurrentDate();
insert("insert into t_beacon_history (beacon_history_id, major, minor, insert_date, update_date) values (?,?,?,?,?)", dto.getInsertValues());
}
public void update(BeaconHistoryDto dto) {
dto.updateDate = DateTimeUtil.getCurrentDate();
update("update t_beacon_history set update_date=? where major=? and minor=?", dto.getUpdateValues());
}
public void insertOrUpdate(BeaconHistoryDto dto) {
if (exists(dto.major, dto.minor)) {
update(dto);
}
else {
insert(dto);
}
}
}
......@@ -327,66 +327,11 @@ public class ContentDao extends AbstractDao {
return rawQueryGetDtoList("select content_id from t_content where content_id not in (select content_id from r_content_group where group_relation_id =(select group_relation_id From m_group where group_level = 0)) order by delivery_start_date DESC", null, ContentDto.class);
}
//공개일 최신순 다운로드하지 않은 콘텐츠
public List<ContentDto> getNewContents(int listCount) {
return rawQueryGetDtoList("select * from t_content where downloaded_flg = 0 and delivery_start_date <= ? order by delivery_start_date DESC LIMIT " + listCount, new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
//reading_date 정렬 검색. 최근 읽은 순으로
public List<ContentDto> getReadingDateContents(int listCount) {
return rawQueryGetDtoList("select * from t_content where (downloaded_flg = 1 or delivery_type <> 0) and reading_date is not null and delivery_start_date <= ? order by reading_date DESC LIMIT " + listCount, new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
//업데이트 해야 할 콘텐츠들 목록(다운로드 받은 목록 중). 공개일 내림차순 정렬
public List<ContentDto> getUpdateContents(int listCount) {
return rawQueryGetDtoList("select * from t_content where downloaded_flg = 1 and updated_flg = 1 and delivery_start_date <= ? order by delivery_start_date DESC LIMIT " + listCount, new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
//즐겨찾기 된 콘텐츠를 최근 본 열람한 시간 순으로 정렬
public List<ContentDto> getFavoriteContents(int listCount) {
return rawQueryGetDtoList("select * from t_content where favorite_flg = 1 and delivery_start_date <= ? order by reading_date DESC LIMIT " + listCount, new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
//열람횟수 컬럼 높은 순으로 정렬한 다운로드 한 콘텐츠
public List<ContentDto> getMostviewedContents(int listCount) {
return rawQueryGetDtoList("select * from t_content where (downloaded_flg = 1 or delivery_type <> 0) and reading_date is not null and delivery_start_date <= ? order by reading_count DESC LIMIT " + listCount, new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
//선택 된 groupId의 콘텐츠
public List<ContentDto> getGroupContents(int groupId) {
return rawQueryGetDtoList("select * from t_content where content_id in (select content_id from r_content_group where group_relation_id in (select group_relation_id from m_group where group_id = "+ groupId + ")) and delivery_start_date <= ? " , new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
//선택 된 categoryId의 콘텐츠
public List<ContentDto> getCategoryContents(int categoryId) {
return rawQueryGetDtoList("select * from t_content where content_id in (select content_id from r_content_category where category_relation_id in (select category_relation_id from m_category where category_id = " + categoryId + ")) and delivery_start_date <= ? order by delivery_start_date DESC " , new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
//선택 된 myFolderId의 콘텐츠
public List<ContentDto> getMyFolderContents(int myFolderId) {
return rawQueryGetDtoList("select * from t_content where content_id in (select content_id from r_content_folder where folder_id in (select folder_id from t_folder where folder_id = "+ myFolderId + ")) and delivery_start_date <= ?" , new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, ContentDto.class);
}
public boolean updateUnAuthorizedFlg(long contentId, boolean unAuthorized) {
long count = update("update t_content set unauthorized_content_flg = ? where content_id= ?", new Object[]{unAuthorized, contentId});
return (count > 0);
}
//선택 된 groupId의 존재유무
public boolean isExistGroup(int groupId) {
return rawQueryGetDtoList("select * from m_group where group_id = "+ groupId, null, ContentDto.class).size() > 0;
}
//선택 된 categoryId의 존재유무
public boolean isExistCategory(int categoryId) {
return rawQueryGetDtoList("select * from m_category where category_id = " + categoryId, null, ContentDto.class).size() > 0;
}
//선택 된 myFolderId의 존재유무
public boolean isExistMyFolder(int myFolderId) {
return rawQueryGetDtoList("select * from t_folder where folder_id = "+ myFolderId, null, ContentDto.class).size() > 0;
}
public List<ContentDto> getContents(ContentSearchDto contentSearchDto) {
String sql = generateGetcontentQuery(contentSearchDto);
String[] args = generateGetContentArguments(contentSearchDto);
......
package jp.agentec.abook.abv.bl.data.dao;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.dto.ContentIdConvDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
public class ContentIdConvDao extends AbstractDao {
/*package*/ ContentIdConvDao() {
}
@Override
public ContentIdConvDto convert(Cursor cursor) {
ContentIdConvDto dto = new ContentIdConvDto();
int colnum = cursor.getColumnIndex("content_id");
if (colnum != -1) {
dto.contentId = cursor.getLong(colnum);
}
colnum = cursor.getColumnIndex("site_id");
if (colnum != -1) {
dto.siteId = cursor.getInt(colnum);
}
colnum = cursor.getColumnIndex("contract_id");
if (colnum != -1) {
dto.contractId = cursor.getInt(colnum);
}
colnum = cursor.getColumnIndex("cms_content_id");
if (colnum != -1) {
dto.cmsContentId = cursor.getLong(colnum);
}
colnum = cursor.getColumnIndex("contract_content_id");
if (colnum != -1) {
dto.contractContentId = cursor.getInt(colnum);
}
colnum = cursor.getColumnIndex("download_url");
if (colnum != -1) {
dto.downloadUrl = cursor.getString(colnum);
}
colnum = cursor.getColumnIndex("target_app_version");
if (colnum != -1) {
dto.targetAppVersion = cursor.getString(colnum);
}
colnum = cursor.getColumnIndex("export_date");
if (colnum != -1) {
dto.exportDate = DateTimeUtil.toDate(cursor.getString(colnum), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
colnum = cursor.getColumnIndex("cms_content_update_id");
if (colnum != -1) {
dto.cmsContentUpdateId = cursor.getString(colnum);
}
colnum = cursor.getColumnIndex("insert_date");
if (colnum != -1) {
dto.insertDate = DateTimeUtil.toDate(cursor.getString(colnum), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
colnum = cursor.getColumnIndex("update_date");
if (colnum != -1) {
dto.updateDate = DateTimeUtil.toDate(cursor.getString(colnum), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
colnum = cursor.getColumnIndex("short_url");
if (colnum != -1) {
dto.shortUrl = cursor.getString(colnum);
}
return dto;
}
public ContentIdConvDto getDto(long contentId) {
return rawQueryGetDto("select * from t_content_id_conv where content_id=?", new String[]{""+contentId}, ContentIdConvDto.class);
}
public ContentIdConvDto getDtoByCmsContentId(int siteId, long cmsContentId) {
return rawQueryGetDto("select * from t_content_id_conv where site_id=? and cms_content_id=?", new String[]{""+siteId, ""+cmsContentId}, ContentIdConvDto.class);
}
public boolean exists(long contentId) {
return rawQueryGetString("select content_id from t_content_id_conv where content_id=?", new String[]{""+contentId}) != null;
}
public List<Long> getContentIdListByContract(Integer siteId, Integer contractId) {
return rawQueryGetLongList("select * from t_content_id_conv where site_id=? and contract_id=?", new String[]{""+siteId, ""+contractId});
}
public void insert(ContentIdConvDto dto) {
insert("insert into t_content_id_conv (content_id, site_id, contract_id, cms_content_id, contract_content_id, download_url, target_app_version, export_date, cms_content_update_id, short_url, insert_date, update_date)"
+ " values (?,?,?,?,?,?,?,?,?,?,current_timestamp,current_timestamp)", dto.getInsertValues());
}
public void update(ContentIdConvDto dto) {
update("update t_content_id_conv set site_id=?, contract_id=?, cms_content_id=?, contract_content_id=?, download_url=?, target_app_version=?, export_date=?, cms_content_update_id=?, short_url=? , update_date=current_timestamp where content_id=?", dto.getUpdateValues());
}
public void insertOrUpdateupdate(ContentIdConvDto dto) {
if (exists(dto.contentId)) {
update(dto);
}
else {
insert(dto);
}
}
}
package jp.agentec.abook.abv.bl.data.dao;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.FolderDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
public class FolderDao extends AbstractDao {
private static final String TAG = "FolderDao";
/*package*/ FolderDao() {
}
@Override
protected FolderDto convert(Cursor cursor) {
FolderDto dto = new FolderDto();
int colnum = cursor.getColumnIndex("folder_id");
if (colnum != -1) {
dto.folderId = cursor.getInt(colnum);
}
colnum = cursor.getColumnIndex("folder_name");
if (colnum != -1) {
dto.folderName = cursor.getString(colnum);
}
colnum = cursor.getColumnIndex("parent_folder_id");
if (colnum != -1) {
dto.parentFolderId = cursor.getInt(colnum);
}
colnum = cursor.getColumnIndex("insert_date");
if (colnum != -1) {
dto.insertDate = DateTimeUtil.toDate(cursor.getString(colnum), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
colnum = cursor.getColumnIndex("update_date");
if (colnum != -1) {
dto.updateDate = DateTimeUtil.toDate(cursor.getString(colnum), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
colnum = cursor.getColumnIndex("content_count");
if (colnum != -1) {
dto.contentCount = cursor.getInt(colnum);
}
colnum = cursor.getColumnIndex("disp_order");
if (colnum != -1) {
dto.dispOrder = cursor.getShort(colnum);
}
colnum = cursor.getColumnIndex("edit_flg");
if (colnum != -1) {
dto.editFlg = toBool(cursor.getInt(colnum));
}
colnum = cursor.getColumnIndex("display_count");
if (colnum != -1) {
dto.displayCount = cursor.getString(colnum);
}
colnum = cursor.getColumnIndex("folder_path");
if (colnum != -1) {
dto.folderPath = cursor.getString(colnum);
}
return dto;
}
/**
* フォルダ表示画面のフォルダの件数返します。この情報は、常に、ダウンロード済みのコンテンツ情報のみ対象とします。
 * @param folderId フォルダのIDです。
* @return 当該するフォルダの件数を返します。
*/
public List<FolderDto> getFolder(int folderId) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT tf.folder_id AS folder_id ");
sql.append(" , tf.folder_name AS folder_name ");
sql.append(" , tf.disp_order AS disp_order ");
sql.append(" , tf.parent_folder_id AS parent_folder_id ");
sql.append(" , tf.insert_date AS insert_date ");
sql.append(" , tf.update_date AS update_date ");
sql.append(" , COUNT(rcf.content_id) AS content_count ");
sql.append(" , '( ' || COUNT(rcf.content_id) || ' )' AS display_count ");
sql.append(" FROM t_folder AS tf ");
sql.append(" LEFT OUTER JOIN r_content_folder AS rcf ");
sql.append(" ON tf.folder_id = rcf.folder_id ");
sql.append(" WHERE tf.folder_id = ? ");
sql.append(" GROUP BY tf.folder_id ");
sql.append(" ORDER BY tf.disp_order, tf.folder_name ");
return rawQueryGetDtoList(sql.toString(), new String[]{""+ folderId}, FolderDto.class);
}
/**
* フォルダー表示画面のフォルダー情報を取得します。この情報は、常に、ダウンロード済みのコンテンツ情報のみ対象とします。
* @return フォルダー表示画面のフォルダー情報を返します。
* @since 1.0.0
*/
public List<FolderDto> getFolderList(int[] parentFolderId) {
List<FolderDto> folderList = rawQueryGetDtoList(generateGetFolderQuery(parentFolderId), null, FolderDto.class);
for(FolderDto folder : folderList){
// 表示用に子階層すべてのコンテンツを合計数を連結
folder.displayCount = folder.contentCount + "/" + getSumChildrenContentCount(folder.folderPath);
}
return folderList;
}
private String generateGetFolderQuery(int[] parentFolderIds) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT TF.folder_id ");
sql.append(" , TF.parent_folder_id ");
sql.append(" , TF.disp_order ");
sql.append(" , TF.folder_name ");
sql.append(" , TF.folder_path ");
sql.append(" , CASE WHEN cc.content_count is NULL THEN 0 ");
sql.append(" ELSE cc.content_count ");
sql.append(" END AS content_count ");
sql.append(" FROM t_folder TF ");
sql.append(" LEFT OUTER JOIN ( ");
sql.append(" SELECT folder_id ");
sql.append(" , count(folder_id) as content_count ");
sql.append(" FROM r_content_folder ");
sql.append(" GROUP BY folder_id ");
sql.append(" ) cc ");
sql.append(" ON cc.folder_id = tf.folder_id ");
if (parentFolderIds != null && parentFolderIds.length > 0) {
sql.append(" WHERE parent_folder_id IN ");
sql.append(generateInClause(parentFolderIds));
}return sql.toString();
}
private int getSumChildrenContentCount(String parentFolderPath){
StringBuffer sql = new StringBuffer();
sql.append(" SELECT count(tf.folder_id) ");
sql.append(" FROM t_folder tf ");
sql.append(" INNER JOIN r_content_folder rcf ");
sql.append(" ON tf.folder_id = rcf.folder_id ");
sql.append(" WHERE folder_path LIKE ? || '%' ");
return rawQueryGetInt(sql.toString(), new String[]{parentFolderPath});
}
public int getFolderMax() {
return rawQueryGetInt("select MAX(seq) + 1 AS seq from sqlite_sequence where name=?", new String[]{"t_folder"});
}
public void insertFolder(int folderId, int parentFolderId, String folderName, int dispOrder) {
StringBuffer sql = new StringBuffer();
sql.append(" INSERT INTO t_folder (folder_id, parent_folder_id, folder_name, disp_order, folder_path , insert_date, update_date ) ");
sql.append(" VALUES ( ? ");
sql.append(" , ? ");
sql.append(" , ? ");
sql.append(" , ? ");
sql.append(" , ( SELECT folder_path || '/' || ? AS folder_path FROM t_folder WHERE folder_id = ? ) ");
sql.append(" , DATETIME('NOW') ");
sql.append(" , DATETIME('NOW') )");
Logger.v(TAG, "sql=%s", sql);
insert(sql.toString(), new Object[]{folderId, parentFolderId, folderName, dispOrder, folderId, parentFolderId});
}
/**
* フォルダー表示画面のフォルダ情報を変更します。この情報は、常に、ダウンロード済みのコンテンツ情報のみ対象とします。
*/
public void updateFolder(int folderId, int parentFolderId, String folderName) {
StringBuffer sql = new StringBuffer();
sql.append(" UPDATE t_folder ");
sql.append(" SET folder_name = ? ");
sql.append(" , parent_folder_id = ? ");
sql.append(" , disp_order = ( SELECT disp_order + 1 AS disp_order FROM t_folder WHERE folder_id = ? ) ");
sql.append(" , folder_path = ( SELECT folder_path || '/' || ? AS folder_path FROM t_folder WHERE folder_id = ? )");
sql.append(" WHERE folder_id = ? ");
Logger.v(TAG, "sql=%s", sql);
update(sql.toString(), new Object[]{folderName, parentFolderId, parentFolderId, folderId, parentFolderId, folderId});
}
public void updateFolderMove(int folderId , String oldFolderPath) {
StringBuffer sql = new StringBuffer();
sql.append(" UPDATE t_folder ");
sql.append(" SET disp_order = ( SELECT disp_order + 1 AS disp_order FROM t_folder WHERE folder_id = ? ) ");
sql.append(" , folder_path = replace(folder_path, ? , ( SELECT folder_path AS folder_path FROM t_folder WHERE folder_id = ? ))") ;
sql.append(" WHERE folder_path like ? || '%' ");
update(sql.toString(), new Object[]{folderId,oldFolderPath,folderId,oldFolderPath});
}
public void deleteFolder(int FolderId) {
delete("t_folder", "folder_id=?", new String[]{""+ FolderId});
}
public String getFolderPath(int FolderId) {
return rawQueryGetString("select folder_path from t_folder where folder_id=?", new String[]{""+ FolderId});
}
public FolderDto getFolderInfo(int folderId) {
return rawQueryGetDto("select * from t_folder where folder_id = " + folderId, null, FolderDto.class);
}
public List<FolderDto> getFolderSpareList(int baseId, int parentId) {
List<FolderDto> list;
list = rawQueryGetDtoList("select * from t_folder tf where (tf.folder_id = ?) UNION select * from t_folder tf where (tf.parent_folder_id = ?)", new String[]{""+ baseId, ""+ parentId}, FolderDto.class);
return list;
}
public boolean isExistParent(int baseId) {
return rawQueryGetInt("select * from t_folder where parent_folder_id = " + baseId, null) > 0;
}
}
package jp.agentec.abook.abv.bl.data.dao;
import java.util.List;
import java.util.TimeZone;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.dto.InspectTaskReportDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
/**
* Created by seo-y on 2018/12/17.
......
package jp.agentec.abook.abv.bl.data.dao;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.dto.LockDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
public class LockDao extends AbstractDao {
/*package*/ LockDao() {
}
@Override
protected LockDto convert(Cursor cursor) {
LockDto dto = new LockDto();
int column = cursor.getColumnIndex("folder_id");
if (column != -1) {
dto.folderId = cursor.getInt(column);
}
column = cursor.getColumnIndex("folder_position");
if (column != -1) {
dto.folderPosition = cursor.getInt(column);
}
column = cursor.getColumnIndex("prev_folder_list");
if (column != -1) {
dto.prevFolderList = cursor.getBlob(column);
}
column = cursor.getColumnIndex("insert_date");
if (column != -1) {
dto.insertDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
return dto;
}
public LockDto getLock() {
return rawQueryGetDto("select * from t_lock", null, LockDto.class);
}
public void insertLock(LockDto dto) {
insert("insert into t_lock (folder_id, folder_position, prev_folder_list, insert_date) values (?,?,?,?)", dto.getInsertValues());
}
public void deleteLock() {
delete("t_lock", null, null);
}
}
......@@ -124,7 +124,6 @@ public class MemberInfoDao extends AbstractDao {
delete("l_content_object_log", null, null);
delete("l_content_reading_log", null, null);
delete("t_content_download_queue", null, null);
delete("t_lock", null, null);
delete("m_service_option", null, null);
delete("m_member_info", null, null);
......
package jp.agentec.abook.abv.bl.data.dao;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
......
......@@ -4,7 +4,6 @@ import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ProjectDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
......
package jp.agentec.abook.abv.bl.data.dao;
import java.util.Date;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.dto.SiteDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
public class SiteDao extends AbstractDao {
/*package*/ SiteDao() {
}
@Override
public SiteDto convert(Cursor cursor) {
SiteDto dto = new SiteDto();
int column = cursor.getColumnIndex("site_id");
if (column != -1) {
dto.siteId = cursor.getInt(column);
}
column = cursor.getColumnIndex("site_url");
if (column != -1) {
dto.siteUrl = cursor.getString(column);
}
column = cursor.getColumnIndex("site_name");
if (column != -1) {
dto.siteName = cursor.getString(column);
}
column = cursor.getColumnIndex("download_url");
if (column != -1) {
dto.downloadUrl = cursor.getString(column);
}
column = cursor.getColumnIndex("log_send_url");
if (column != -1) {
dto.logSendUrl = cursor.getString(column);
}
column = cursor.getColumnIndex("enquete_send_url");
if (column != -1) {
dto.enqueteSendUrl = cursor.getString(column);
}
column = cursor.getColumnIndex("del_flg");
if (column != -1) {
dto.delFlg = cursor.getInt(column);
}
column = cursor.getColumnIndex("insert_date");
if (column != -1) {
dto.insertDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
column = cursor.getColumnIndex("update_date");
if (column != -1) {
dto.updateDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
return dto;
}
public SiteDto getDto(int siteId) {
return rawQueryGetDto("select * from m_site where site_id=?", new String[]{""+siteId}, SiteDto.class);
}
public boolean exists(int siteId) {
return rawQueryGetString("select site_id from m_site where site_id=?", new String[]{""+siteId}) != null;
}
public Date getLastUpdate() {
String updateDate = rawQueryGetString("select update_date from m_site order by update_date desc limit 1", null);
if (updateDate == null) {
return null;
}
return DateTimeUtil.toDate(updateDate, "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
public void insert(SiteDto siteDto) {
insert("insert into m_site (site_id, site_url, site_name, download_url, log_send_url, enquete_send_url, del_flg, insert_date, update_date) values (?,?,?,?,?,?,?,?,?)", siteDto.getInsertValues());
}
public void update(SiteDto siteDto) {
update("update m_site set site_url=?, site_name=?, download_url=?, log_send_url=?, enquete_send_url=?, del_flg=?, insert_date=?, update_date=? where site_id=?", siteDto.getUpdateValues());
}
public void insertOrUpdate(SiteDto siteDto) {
if (exists(siteDto.siteId)) { // 更新
update(siteDto);
}
else { // 登録
insert(siteDto);
}
}
}
package jp.agentec.abook.abv.bl.data.dao;
import java.util.Date;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ProjectDto;
import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
/**
* Created by leej on 2018/08/31.
......
......@@ -3,10 +3,7 @@ package jp.agentec.abook.abv.bl.data.dao;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.db.SQLiteStatement;
import jp.agentec.abook.abv.bl.dto.TaskDirectionsItemsDto;
import jp.agentec.abook.abv.bl.dto.TaskDto;
/**
* Created by leej on 2018/08/31.
......
package jp.agentec.abook.abv.bl.data.tables;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
public class TInteractiveInfo extends SQLiteTableScript {
public TInteractiveInfo() {
super();
}
@Override
public List<String> getCreateScript(int version) {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
// since plus 1.6.0
sql.append(" CREATE TABLE t_interactive_info ( ");
sql.append(" interactive_id INTEGER NOT NULL ");
sql.append(" , playlist_id INTEGER NOT NULL ");
sql.append(" , list_order INTEGER NOT NULL ");
sql.append(" , dst_content_id BIGINT NOT NULL ");
sql.append(" , page_from INTEGER ");
sql.append(" , page_to INTEGER ");
sql.append(" , dst_page_from INTEGER NOT NULL ");
sql.append(" , dst_page_to INTEGER NOT NULL ");
sql.append(" , PRIMARY KEY (interactive_id) ");
sql.append(" , FOREIGN KEY (playlist_id, list_order) REFERENCES t_playlist_detail (playlist_id, list_order) ");
sql.append(" , FOREIGN KEY (dst_content_id) REFERENCES t_content (content_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
return ddl;
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Plus_1_6_0) {
ddl.addAll(getCreateScript(newVersion));
}
return ddl;
}
@Override
public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object[] params) {
return null;
}
}
package jp.agentec.abook.abv.bl.data.tables;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
import jp.agentec.adf.util.StringUtil;
public class TLock extends SQLiteTableScript {
public static final int RootFolderId = 0;
public TLock() {
}
@Override
public List<String> getCreateScript(int version) {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
// since 1.0.0
sql.append(" CREATE TABLE t_lock ( ");
sql.append(" folder_id INTEGER NOT NULL ");
sql.append(" , folder_position INTEGER "); // since 1_5_2_03
sql.append(" , prev_folder_list BLOB "); // since 1_5_2_03
sql.append(" , insert_date DATETIME NOT NULL ");
sql.append(" , PRIMARY KEY (folder_id) ");
sql.append(" , FOREIGN KEY (folder_id) REFERENCES t_folder (folder_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
StringUtil.clear(sql);
return ddl;
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Ver1_5_2_03) {
ddl.add(" ALTER TABLE t_lock ADD COLUMN folder_position INTEGER "); // since 1_5_2_03
ddl.add(" ALTER TABLE t_lock ADD COLUMN prev_folder_list BLOB "); // since 1_5_2_03
}
return ddl;
}
@Override
public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object... params) {
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Ver1_5_2_03) {
ddl.add(" DELETE FROM t_lock ");
}
return ddl;
}
}
package jp.agentec.abook.abv.bl.data.tables;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
import jp.agentec.adf.util.FileUtil;
public class TPlaylist extends SQLiteTableScript {
public TPlaylist() {
super();
}
@Override
public List<String> getCreateScript(int version) {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
// since plus 1.6.0
sql.append(" CREATE TABLE t_playlist ( ");
sql.append(" playlist_id INTEGER NOT NULL ");
sql.append(" , playlist_name VARCHAR(50) NOT NULL ");
sql.append(" , update_date DATETIME ");
sql.append(" , telop_speed INTEGER default 1");
sql.append(" , display_telop BOOLEAN default 0");
sql.append(" , display_weather_forecast BOOLEAN default 0");
sql.append(" , PRIMARY KEY (playlist_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
return ddl;
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Plus_1_6_0) {
ddl.addAll(getCreateScript(newVersion));
} else {
if (oldVersion < DatabaseVersions.Plus_1_6_4) {
ddl.add("ALTER TABLE t_playlist ADD COLUMN telop_speed INTEGER default 1");
ddl.add("ALTER TABLE t_playlist ADD COLUMN display_telop BOOLEAN default 0");
ddl.add("ALTER TABLE t_playlist ADD COLUMN display_weather_forecast BOOLEAN default 0");
// 新着更新でテロップ情報を保存しなおすためにjsonファイルを削除しておく
try {
FileUtil.delete(ABVEnvironment.getInstance().getScheduleJsonFilePath());
} catch (Exception e) {
Logger.e("TPlaylist", "Delete schedule json file failed.");
}
}
}
return ddl;
}
@Override
public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object[] params) {
return null;
}
}
package jp.agentec.abook.abv.bl.data.tables;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
public class TPlaylistDetail extends SQLiteTableScript {
public TPlaylistDetail() {
super();
}
@Override
public List<String> getCreateScript(int version) {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
// since plus 1.6.0
sql.append(" CREATE TABLE t_playlist_detail ( ");
sql.append(" playlist_id INTEGER NOT NULL ");
sql.append(" , list_order INTEGER NOT NULL ");
sql.append(" , content_id BIGINT NOT NULL ");
sql.append(" , slide INTEGER NOT NULL ");
sql.append(" , stay INTEGER NOT NULL ");
sql.append(" , telop_speed INTEGER default 1");
sql.append(" , display_telop_status INTEGER default 0");
sql.append(" , weather_forecast_status INTEGER default 0");
sql.append(" , PRIMARY KEY (playlist_id, list_order) ");
sql.append(" , FOREIGN KEY (playlist_id) REFERENCES t_playlist (playlist_id) ");
sql.append(" , FOREIGN KEY (content_id) REFERENCES t_content (content_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
return ddl;
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Plus_1_6_0) {
ddl.addAll(getCreateScript(newVersion));
} else {
if (oldVersion < DatabaseVersions.Plus_1_6_4) {
ddl.add("ALTER TABLE t_playlist_detail ADD COLUMN telop_speed INTEGER default 1");
ddl.add("ALTER TABLE t_playlist_detail ADD COLUMN display_telop_status INTEGER default 0");
ddl.add("ALTER TABLE t_playlist_detail ADD COLUMN weather_forecast_status INTEGER default 0");
}
}
return ddl;
}
@Override
public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object[] params) {
return null;
}
}
package jp.agentec.abook.abv.bl.data.tables;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
public class TSchedule extends SQLiteTableScript {
public TSchedule() {
super();
}
@Override
public List<String> getCreateScript(int version) {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
// since plus 1.6.0
sql.append(" CREATE TABLE t_schedule ( ");
sql.append(" schedule_id INTEGER NOT NULL ");
sql.append(" , start DATETIME NOT NULL ");
sql.append(" , end DATETIME NOT NULL ");
sql.append(" , playlist_id INTEGER NOT NULL ");
sql.append(" , sub_playlist_id INTEGER ");
sql.append(" , default_schedule BOOLEAN DEFAULT 0");
sql.append(" , PRIMARY KEY (schedule_id) ");
sql.append(" , FOREIGN KEY (playlist_id) REFERENCES t_playlist (playlist_id) ");
sql.append(" , FOREIGN KEY (sub_playlist_id) REFERENCES t_playlist (playlist_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
addIndex(ddl);
return ddl;
}
private void addIndex(List<String> ddl) {
ddl.add(" CREATE INDEX idx_schedule_id ON t_schedule (schedule_id) ");
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Plus_1_6_0) {
ddl.addAll(getCreateScript(newVersion));
}
if (oldVersion < DatabaseVersions.Plus_1_8_5_7) {
ddl.add("ALTER TABLE t_schedule ADD COLUMN default_schedule BOOLEAN DEFAULT 0");
}
return ddl;
}
@Override
public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object[] params) {
if (oldVersion < DatabaseVersions.Plus_1_8_5_7) {
databaseConnection.execSQL("UPDATE t_schedule SET default_schedule = 1 WHERE start < '2000-00-00 00:00:00'");
}
return null;
}
}
package jp.agentec.abook.abv.bl.download;
import java.io.File;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.Date;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.ContentIdConvDao;
import jp.agentec.abook.abv.bl.data.dao.ContractDao;
import jp.agentec.abook.abv.bl.data.dao.SiteDao;
import jp.agentec.abook.abv.bl.dto.ContentIdConvDto;
import jp.agentec.abook.abv.bl.dto.ContractDto;
import jp.agentec.abook.abv.bl.dto.SiteDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentLogic;
import jp.agentec.abook.abv.bl.repo.RepoClient;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
import net.lingala.zip4j.exception.ZipException;
import org.json.adf.JSONObject;
/**
* Reader用(abkファイル読み込みを扱うクラス)
* 実装済み:QA未検証
*
* @author tsukada
*
*/
public class ContentImporter {
private String TAG = "ContentImporter";
private String contentInfoDir;
private ContentLogic contentLogic;
private long contentId;
private String importDir;
private Integer siteId;
private Integer contractId;
private Integer contractContentId;
private Long cmsContentId;
private String repositoryFqdn;
private JSONObject metaJson;
/**
* 初期化処理を行う
*
* @param zipFilePath
* @param password
* @return
* @throws NoSuchAlgorithmException
* @throws ZipException
* @throws IOException
* @throws ABVException
*/
public boolean init(String zipFilePath, String password, String repositoryFqdn) throws NoSuchAlgorithmException, ZipException, IOException, ABVException {
importDir = ABVEnvironment.getInstance().getImportDirectory() + System.currentTimeMillis() + "/";
FileUtil.delete(importDir);
FileUtil.createNewDirectory(importDir);
if (!ContentFileExtractor.getInstance().checkPassword(zipFilePath, importDir, password)) {
return false;
}
ContentFileExtractor.getInstance().extractZipFile(-1, zipFilePath, importDir, password, false);
metaJson = new JSONObject(FileUtil.readTextFile(importDir + "meta.json"));
siteId = metaJson.getInt("siteId");
contractId = metaJson.getInt("contractId");
contractContentId = metaJson.getInt("contractContentId");
cmsContentId = metaJson.getLong("contentId");
contentId = ContentLogic.getReaderContentId(siteId, cmsContentId);
contentInfoDir = ABVEnvironment.getInstance().getContentDirectory(contentId) + "/";
contentLogic = AbstractLogic.getLogic(ContentLogic.class);
this.repositoryFqdn = repositoryFqdn;
return true;
}
/**
* すでにコンテンツがあるかどうかを返す。
*
* @return
*/
public boolean alreadyExists() {
return AbstractDao.getDao(ContentDao.class).exists(contentId);
}
/**
* importDirで1時間以上経過しているものを削除する
*
* @return
*/
public void deleteOldImportDir() {
File[] dirs = FileUtil.getChildDirectories(ABVEnvironment.getInstance().getImportDirectory());
if (dirs != null) {
for (File dir : dirs) {
if (StringUtil.isNumber(dir.getName()) && Long.parseLong(dir.getName()) < System.currentTimeMillis() - 3600000) {
Logger.i(TAG, "delete old import dir: " + dir.getName());
FileUtil.delete(dir);
}
}
}
}
/**
* インポート処理を実行
*
* @throws ZipException
* @throws NoSuchAlgorithmException
* @throws IOException
* @throws ABVException
*/
public void importFromAbk() throws ZipException, NoSuchAlgorithmException, IOException, ABVException {
// contract情報登録
registerContract();
// ContentInfo
FileUtil.delete(contentInfoDir);
ContentFileExtractor.getInstance().removeContentCash(contentId);
FileUtil.move(importDir, contentInfoDir, true);
FileUtil.move(contentInfoDir + "meta.json", contentInfoDir + "json.txt", true);
contentLogic.saveContentInfo(contentInfoDir, contentId, true, true);
// contentIdConv登録
ContentIdConvDto contentIdConvDto = new ContentIdConvDto(contentId, siteId, contractId, cmsContentId, contractContentId, null, null);
AbstractDao.getDao(ContentIdConvDao.class).insertOrUpdateupdate(contentIdConvDto);
// コンテンツ詳細
String contentDetailPath = ABVEnvironment.getInstance().getContentDetailDirectoryPath(contentId, false);
File[] files = new File(contentInfoDir).listFiles();
if (files != null) {
for (File file : files) {
if (file.isFile() && file.getName().matches("pageText_\\d+\\.txt|page_\\d+\\.jpg")) {
file.renameTo(new File(contentDetailPath + "/" + file.getName()));
}
}
}
contentLogic.saveContentDetail(contentId, contentDetailPath);
// リソースファイル
String contentResourcePath = ABVEnvironment.getInstance().getContentResourcesDirectoryPath(contentId, false);
AbstractDao.getDao(ContentDao.class).updateForAbkImport(contentId, contentResourcePath);
ContentFileExtractor.getInstance().doContentResource(contentId, contentResourcePath);
}
/**
* 事業者情報登録
*/
private void registerContract() {
Date zeroDate = new Date(0); // ダミーの日付
// Site登録
SiteDao siteDao = AbstractDao.getDao(SiteDao.class);
SiteDto siteDto = siteDao.getDto(siteId);
if (siteDto == null) {
// マスタ転送を行う
try {
RepoClient.getInstance().transferMaster(repositoryFqdn);
} catch (Exception e) {
// 失敗した場合、ダミーの値をセットする
siteDto = new SiteDto(siteId, "" + siteId, "" + siteId, "", "", "", 0, zeroDate, zeroDate);
siteDao.insert(siteDto);
}
}
// Contract登録
ContractDao contractDao = AbstractDao.getDao(ContractDao.class);
ContractDto contractDto = contractDao.getDto(siteId, contractId);
if (contractDto == null) { // ない場合のみ登録:最初exportDateをupdateDateと比較していたが、マスター転送が正常に反映されなくなるので行わない
contractDto = new ContractDto();
contractDto.siteId = siteId;
contractDto.contractId = contractId;
contractDto.companyName = metaJson.getString("companyName");
contractDto.urlPath = metaJson.getString("urlPath");
contractDto.undeliverableDelete = metaJson.getString("undeliverableDelete");
contractDto.usablePushMessage = metaJson.getString("usablePushMessage");
contractDto.usableReadinglogGps = metaJson.getString("usableReadinglogGps");
contractDto.usableReadinglogObject = metaJson.getString("usableReadinglogObject");
contractDto.delFlg = 0;
contractDto.insertDate = zeroDate;
contractDto.receivePushMessage = 0;
contractDto.updateDate = zeroDate;
contractDao.insertOrUpdate(contractDto);
}
}
}
package jp.agentec.abook.abv.bl.dto;
import java.util.ArrayList;
import java.util.List;
/**
* Created by leej on 2018/09/03.
......
package jp.agentec.abook.abv.bl.dto;
import java.util.Date;
import java.util.List;
/**
......
......@@ -7,7 +7,6 @@ import java.util.Map;
import jp.agentec.abook.abv.bl.acms.client.json.content.ActionInfoJSON;
import jp.agentec.abook.abv.bl.acms.client.json.content.LocationJSON;
import jp.agentec.abook.abv.bl.acms.client.json.content.PageObjectJSON;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.common.util.JsonUtil;
......
......@@ -2,8 +2,6 @@ package jp.agentec.abook.abv.bl.logic;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
......@@ -14,7 +12,6 @@ import jp.agentec.abook.abv.bl.common.Constant.ReadingLogMode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentObjectLogDao;
import jp.agentec.abook.abv.bl.data.dao.ContentPageReadingLogDao;
......
package jp.agentec.abook.abv.bl.logic;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
......@@ -8,21 +7,14 @@ import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters;
import jp.agentec.abook.abv.bl.acms.type.SecurityPolicyType;
import jp.agentec.abook.abv.bl.acms.type.ServiceOption.ServiceOptionId;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Constant.ReaderConstant.ReceivePushMessage;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.AcmsDao;
import jp.agentec.abook.abv.bl.data.dao.ContentIdConvDao;
import jp.agentec.abook.abv.bl.data.dao.ContractDao;
import jp.agentec.abook.abv.bl.data.dao.ServiceOptionDao;
import jp.agentec.abook.abv.bl.dto.AcmsDto;
import jp.agentec.abook.abv.bl.dto.ContentIdConvDto;
import jp.agentec.abook.abv.bl.dto.ContractDto;
import jp.agentec.abook.abv.bl.dto.ServiceOptionDto;
import jp.agentec.abook.abv.bl.repo.RepoClient;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.NumericUtil;
import jp.agentec.adf.util.StringUtil;
......
......@@ -7,7 +7,6 @@ import java.util.List;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetEnqueteReplyParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.EnqueteReplyParameters;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
......
package jp.agentec.abook.abv.bl.logic;
import java.util.List;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.ContentFolderDao;
import jp.agentec.abook.abv.bl.data.dao.FolderDao;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.ContentFolderDto;
import jp.agentec.abook.abv.bl.dto.FolderDto;
import jp.agentec.adf.util.DateTimeUtil;
public class FolderLogic extends AbstractLogic {
private FolderDao folderDao = AbstractDao.getDao(FolderDao.class);
private ContentDao contentDao = AbstractDao.getDao(ContentDao.class);
private ContentFolderDao contentFolderDao = AbstractDao.getDao(ContentFolderDao.class);
/**
* フォルダー表示画面の自分のフォルダから子供フォルダまで情報を取得します。この情報は、常に、ダウンロード済みのコンテンツ情報のみ対象とします。
* @return フォルダー表示画面の自分のフォルダから子供フォルダまで情報を返します。
* @throws Exception
* @since 1.0.0
*/
public List<FolderDto> getAllFolderChildren(int parentFolderId) {
List<FolderDto> allList = folderDao.getFolderList(new int[]{parentFolderId});
for (FolderDto dto : allList) {
List<FolderDto> childrenList = folderDao.getFolderList(new int[]{dto.folderId});
for (FolderDto childrenDto : childrenList) {
allList.add(childrenDto);
}
}
return allList;
}
/**
* フォルダー表示画面のフォルダ情報を追加します。この情報は、常に、ダウンロード済みのコンテンツ情報のみ対象とします。
* @throws Exception
* @since 1.0.0
*/
public void insertFolder(FolderDto dto) {
dto.folderId = folderDao.getFolderMax();
dto.insertDate = DateTimeUtil.getCurrentDate();
dto.updateDate = DateTimeUtil.getCurrentDate();
//dao.insertFolder(dto);
folderDao.insertFolder(folderDao.getFolderMax(), dto.parentFolderId, dto.folderName, dto.dispOrder);
}
/**
* フォルダー表示画面のフォルダ情報を削除します。この情報は、常に、ダウンロード済みのコンテンツ情報のみ対象とします。
* @throws Exception
* @since 1.0.0
*/
public void deleteFolder(List<FolderDto> folders) {
try {
contentDao.beginTransaction();
if (folders != null) {
ContentLogic contentLogic = AbstractLogic.getLogic(ContentLogic.class);
for (FolderDto folderDto : folders) {
List<ContentDto> list = contentLogic.getContentListByFolder(true, null, null, folderDto.folderId, null, null, false, null);
deleteContentFolder(list);
if (list != null) {
for (ContentDto contentDto : list) {
ContentFolderDto dto = new ContentFolderDto();
dto.folderId = 0;
dto.contentId = contentDto.contentId;
dto.insertDate = DateTimeUtil.getCurrentDate();
dto.updateDate = DateTimeUtil.getCurrentDate();
contentFolderDao.insertContentFolder(dto);
}
}
}
}
contentDao.commit();
} catch (Exception e) {
contentDao.rollback();
throw new RuntimeException(e);
} finally {
}
try {
folderDao.beginTransaction();
if (folders != null) {
for (FolderDto folderDto : folders) {
folderDao.deleteFolder(folderDto.folderId);
}
}
folderDao.commit();
} catch (Exception e) {
folderDao.rollback();
throw new RuntimeException(e);
} finally {
}
}
public void updateContentFolder(int folderId, List<ContentDto> list) {
try {
//削除する。
deleteContentFolder(list);
contentDao.beginTransaction();
if (list != null) {
for (ContentDto contentDto : list) {
ContentFolderDto dto = new ContentFolderDto();
dto.folderId = folderId;
dto.contentId = contentDto.contentId;
dto.insertDate = DateTimeUtil.getCurrentDate();
dto.updateDate = DateTimeUtil.getCurrentDate();
contentFolderDao.insertContentFolder(dto);
}
}
contentDao.commit();
} catch (Exception e) {
contentDao.rollback();
throw new RuntimeException(e);
} finally {
}
}
public void deleteContentFolder(List<ContentDto> list) {
try {
contentDao.beginTransaction();
if (list != null) {
for (ContentDto contentDto : list) {
contentFolderDao.deleteContentFolder(contentDto.contentId);
}
}
contentDao.commit();
} catch (Exception e) {
contentDao.rollback();
throw new RuntimeException(e);
} finally {
}
}
public void updateFolderMove(FolderDto dto) {
String folderPath = folderDao.getFolderPath(dto.folderId);
folderDao.updateFolder(dto.folderId, dto.parentFolderId, dto.folderName);
folderDao.updateFolderMove(dto.folderId,folderPath);
folderDao.commit();
}
}
......@@ -13,9 +13,7 @@ import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.AcmsDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.ContentGroupDao;
import jp.agentec.abook.abv.bl.data.dao.GroupDao;
......
package jp.agentec.abook.abv.bl.logic;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.ContentSortingType;
import jp.agentec.abook.abv.bl.data.SortDirection;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentBookmarkDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.ContentMemoDao;
import jp.agentec.abook.abv.bl.dto.MydataDto;
public class MyDataLogic extends AbstractLogic {
private ContentBookmarkDao contentBookmarkDao = AbstractDao.getDao(ContentBookmarkDao.class);
private ContentMemoDao contentMemoDao = AbstractDao.getDao(ContentMemoDao.class);
private ContentDao contentDao = AbstractDao.getDao(ContentDao.class);
public List<MydataDto> getAllMyDataList(String choice, ContentSortingType contentSortingType, SortDirection sortDirection, String[] contentTypes) {
List<MydataDto> list = null;
if (choice.equals("bookmark")) {
list = contentBookmarkDao.getAllMyDataList(contentSortingType, sortDirection, contentTypes);
} else if (choice.equals("memo")) {
list = contentMemoDao.getAllMyDataList(contentSortingType, sortDirection, contentTypes);
} else if (choice.equals("readingdate")) {
list = contentDao.getAllMyDataList(contentSortingType, sortDirection, contentTypes);
}
return list;
}
public List<MydataDto> getMyDataList(String choice, long contentId) {
List<MydataDto> list = null;
if (choice.equals("bookmark")) {
list = contentBookmarkDao.getMyDataList(contentId);
} else if (choice.equals("memo")) {
list = contentMemoDao.getMyDataList(contentId);
} else if (choice.equals("readingdate")) {
list = contentDao.getMyDataList(contentId);
}
return list;
}
public void removeReadingDate(long contentId) {
contentDao.removeReadingContent(contentId);
}
public int getLastViewedPageNum(long contentId) {
return contentDao.getLastViewedPageNum(contentId);
}
}
......@@ -8,7 +8,6 @@ import jp.agentec.abook.abv.bl.acms.client.json.AcmsMessageJSON;
import jp.agentec.abook.abv.bl.acms.client.json.check.FixPushMessageJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.SendPushMessageParameters;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
......@@ -16,7 +15,6 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.PushMessageDao;
import jp.agentec.abook.abv.bl.dto.FixPushMessageDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.adf.util.StringUtil;
/**
* Created by kim jinsung on 2018/09/17.
......
package jp.agentec.abook.abv.bl.logic;
import java.util.Date;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentIdConvDao;
import jp.agentec.abook.abv.bl.data.dao.ContractDao;
import jp.agentec.abook.abv.bl.data.dao.SiteDao;
import jp.agentec.abook.abv.bl.dto.ContentIdConvDto;
import jp.agentec.abook.abv.bl.dto.ContractDto;
import jp.agentec.abook.abv.bl.dto.SiteDto;
import jp.agentec.adf.util.StringUtil;
public class SiteLogic extends AbstractLogic {
private static final String TAG = "SiteLogic";
private SiteDao siteDao = AbstractDao.getDao(SiteDao.class);
private ContractDao contractDao = AbstractDao.getDao(ContractDao.class);
/**
* サイトか事業者のupdate_dateの最新を返す
*
* @return
*/
public Date getLastUpdate() {
Date siteLastUpdate = siteDao.getLastUpdate();
Date contractLastUpdate = contractDao.getLastUpdate();
if (siteLastUpdate == null) {
return contractLastUpdate;
}
else if (contractLastUpdate == null) {
return siteLastUpdate;
}
else if (siteLastUpdate.after(contractLastUpdate)){
return siteLastUpdate;
}
else {
return contractLastUpdate;
}
}
/**
* ログ送信先を取得
* TODO: キャッシュ化を検討
*
* @param contentId
* @param isReadingLog
* @return
*/
public String getLogUrl(long contentId, boolean isReadingLog) {
ContentIdConvDto contentIdConvDto = AbstractDao.getDao(ContentIdConvDao.class).getDto(contentId);
if (contentIdConvDto == null) {
Logger.e(TAG, "contentId not found in ContentIdConv" + contentId);
return "NOSEND";
}
SiteDto siteDto = siteDao.getDto(contentIdConvDto.siteId); // siteチェック
if (siteDto.delFlg != 0) {
Logger.e(TAG, "site is deleted. siteId=" + contentIdConvDto.siteId);
return "NOSEND";
}
if (StringUtil.isNullOrEmpty(siteDto.logSendUrl) || !siteDto.logSendUrl.contains("{URLPATH}")) { // logSendUrlチェック
Logger.e(TAG, "logSendUrl not found or invalid. siteId=" + contentIdConvDto.siteId + " contentId=" + contentId);
return null; // 次のマスタ更新で値がセットされる可能性もあるのでリトライ対象
}
ContractDto contractDto = contractDao.getDto(contentIdConvDto.siteId, contentIdConvDto.contractId);
if (contractDto.delFlg != 0) {
Logger.e(TAG, "contract is deleted. contractId=" + contentIdConvDto.contractId);
return "NOSEND";
}
if (!isReadingLog) {
siteDto.logSendUrl = siteDto.logSendUrl.replace(AcmsApis.ApiUrlContentReadingLog, AcmsApis.ApiUrlContentDownloadLog);
}
return siteDto.logSendUrl.replace("{URLPATH}", contractDto.urlPath);
}
/**
* アンケート送信先を取得
*
* @param contentId
* @return
*/
public String getEnqueteSendUrl(long contentId) {
ContentIdConvDto contentIdConvDto = AbstractDao.getDao(ContentIdConvDao.class).getDto(contentId);
if (contentIdConvDto == null) {
Logger.e(TAG, "contentId not found in ContentIdConv" + contentId);
return "NOSEND";
}
SiteDto siteDto = siteDao.getDto(contentIdConvDto.siteId); // siteチェック
if (siteDto.delFlg != 0) {
Logger.e(TAG, "site is deleted. siteId=" + contentIdConvDto.siteId);
return "NOSEND";
}
if (StringUtil.isNullOrEmpty(siteDto.enqueteSendUrl) || !siteDto.enqueteSendUrl.contains("{URLPATH}")) { // logSendUrlチェック
Logger.e(TAG, "enqueteSendUrl not found or invalid. siteId=" + contentIdConvDto.siteId + " contentId=" + contentId);
return null; // 次のマスタ更新で値がセットされる可能性もあるのでリトライ対象
}
ContractDto contractDto = contractDao.getDto(contentIdConvDto.siteId, contentIdConvDto.contractId);
if (contractDto.delFlg != 0) {
Logger.e(TAG, "contract is deleted. contractId=" + contentIdConvDto.contractId);
return "NOSEND";
}
return siteDto.enqueteSendUrl.replace("{URLPATH}", contractDto.urlPath);
}
}
package jp.agentec.abook.abv.bl.repo;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import org.json.adf.JSONObject;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.json.AcmsCommonJSON;
import jp.agentec.abook.abv.bl.acms.client.json.reader.CmsUrlJSON;
import jp.agentec.abook.abv.bl.acms.client.json.reader.ReaderContentJSON;
import jp.agentec.abook.abv.bl.acms.client.json.reader.SiteJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.reader.UserAccountParameters;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Constant.ReaderConstant;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.common.util.SecurityUtil;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentIdConvDao;
import jp.agentec.abook.abv.bl.data.dao.ContentReadingLogDao;
import jp.agentec.abook.abv.bl.data.dao.ContractDao;
import jp.agentec.abook.abv.bl.data.dao.EnqueteDao;
import jp.agentec.abook.abv.bl.data.dao.SiteDao;
import jp.agentec.abook.abv.bl.dto.ContractDto;
import jp.agentec.abook.abv.bl.dto.SiteDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.SiteLogic;
import jp.agentec.adf.net.http.HttpResponse;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
import jp.agentec.adf.util.DateTimeUtil.DateUnit;
public class RepoClient {
......@@ -54,158 +29,6 @@ public class RepoClient {
}
/**
* マスター転送を行う
*
* @param repositoryFqdn
* @return
* @throws AcmsException
* @throws NetworkDisconnectedException
*/
public String transferMaster(String repositoryFqdn) throws AcmsException, NetworkDisconnectedException {
String keyForReader = SecurityUtil.getEncryptString(ReaderConstant.SHARED_SECRET_REPO, "" + System.currentTimeMillis(), true);
// マスタ転送
String getMasterUrl = "https://" + repositoryFqdn + "/repo/getMaster?key="+ keyForReader;
Date lastUpdate = AbstractLogic.getLogic(SiteLogic.class).getLastUpdate();
if (lastUpdate != null) {
lastUpdate = DateTimeUtil.add(lastUpdate, DateUnit.Second, 1); // 1秒追加する
try {
getMasterUrl = getMasterUrl + "&IfModifiedSince=" + URLEncoder.encode(DateTimeUtil.toStringInTimeZone(lastUpdate, DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT") + ",GMT", "UTF-8");
} catch (UnsupportedEncodingException e) {
Logger.e(TAG, "getMasterUrl error.", e); // ignore
}
}
Logger.d(TAG, "getMasterUrl: %s", getMasterUrl);
HttpResponse response = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).send(getMasterUrl, "", null);
if (response.httpResponseCode != 200) {
throw new AcmsException(ABVExceptionCode.S_E_ACMS_0500, null);
}
// サイト情報、事業者情報登録
SiteDao siteDao = AbstractDao.getDao(SiteDao.class);
ContractDao contractDao = AbstractDao.getDao(ContractDao.class);
Logger.d(TAG, "------------------:1");
SiteJSON siteJson = new SiteJSON(response.httpResponseBody);
Logger.d(TAG, "------------------:2");
if (siteJson.httpStatus == 200) {
Logger.d(TAG, "------------------:3");
if (siteJson.siteList != null) {
for (SiteDto siteDto : siteJson.siteList) {
siteDao.insertOrUpdate(siteDto);
}
}
Logger.d(TAG, "------------------:4:contractList=" + siteJson.contractList.size());
List<ContractDto> deletedList = new ArrayList<ContractDto>();
if (siteJson.contractList != null) {
for (ContractDto contractDto : siteJson.contractList) {
contractDao.insertOrUpdate(contractDto);
if (contractDto.delFlg != 0) {
deletedList.add(contractDto);
}
}
}
Logger.d(TAG, "------------------:5");
if (!deletedList.isEmpty()) { // 削除事業者がある場合、ログとアンケートを削除する
deleteLogEnquete(deletedList);
}
Logger.d(TAG, "------------------:6");
}
else if (siteJson.httpStatus == 304) { // 変更なし
// do nothing
}
else {
return siteJson.errorMessage;
}
return null;
}
/**
* 未送信閲覧ログとアンケートを削除する
* (DLログはそのまま)
*
* @param deletedList
*/
private void deleteLogEnquete(List<ContractDto> deletedList) {
List<Long> contentList = new ArrayList<Long>();
for (ContractDto contractDto : deletedList) {
contentList.addAll(AbstractDao.getDao(ContentIdConvDao.class).getContentIdListByContract(contractDto.siteId, contractDto.contractId));
}
String contentListStr = StringUtil.join(",", contentList);
Logger.i(TAG, "deleteLogEnquete targetContentIds=" + contentListStr);
AbstractDao.getDao(ContentReadingLogDao.class).deleteUnsendLog(contentListStr);
AbstractDao.getDao(EnqueteDao.class).deleteUnsendEnquete(contentListStr);
}
public AcmsCommonJSON sendReaderUserAccount(String repositoryFqdn, String registractionId, List<ContractDto> permitContractList) throws AcmsException, NetworkDisconnectedException {
// 送信
StringBuilder sb = new StringBuilder();
for (int i = 0; i < permitContractList.size(); i++) {
ContractDto contractDto = permitContractList.get(i);
sb.append(contractDto.siteId);
sb.append("_");
sb.append(contractDto.contractId);
if (i != permitContractList.size() - 1) {
sb.append(",");
}
}
UserAccountParameters params;
if (permitContractList.size() > 0) {
params = new UserAccountParameters(ABVDataCache.getInstance().getMemberInfo().loginId, "r", registractionId, ABVEnvironment.DeviceTypeId, ABVEnvironment.getInstance().appVersion, sb.toString(), Locale.getDefault().getLanguage());
} else {
// 全てOFFの場合削除
params = new UserAccountParameters(ABVDataCache.getInstance().getMemberInfo().loginId, "d", null, null, null, null, Locale.getDefault().getLanguage());
}
String url = createSendReaderUserAccountURL(repositoryFqdn, params);
HttpResponse response = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).send(url, "", null);
Logger.d(TAG, "userAccount response=%s", response.httpResponseBody);
return new AcmsCommonJSON(response.httpResponseBody);
}
private String createSendReaderUserAccountURL(String repositoryFqdn, UserAccountParameters params) {
String keyForReader = SecurityUtil.getEncryptString(ReaderConstant.SHARED_SECRET_REPO, "" + System.currentTimeMillis(), true);
StringBuilder sb = new StringBuilder();
sb.append("https://");
sb.append(repositoryFqdn);
sb.append("/repo/userAccount?key=");
sb.append(keyForReader);
sb.append("&loginId=");
sb.append(params.loginId);
sb.append("&command=");
sb.append(params.command);
if (params.deviceToken != null) {
sb.append("&deviceToken=");
sb.append(params.deviceToken);
}
if (params.deviceTypeId != null) {
sb.append("&deviceTypeId=");
sb.append(params.deviceTypeId);
}
if (params.appVersion != null) {
sb.append("&appVersion=");
sb.append(params.appVersion);
}
if (params.siteContractIds != null) {
sb.append("&siteContractIds=");
sb.append(params.siteContractIds);
}
if (params.language != null) {
sb.append("&language=");
sb.append(params.language);
}
return sb.toString();
}
/**
* サーバ日付(UTC)を返す。
*
* @param repositoryFqdn
......
......@@ -1067,7 +1067,7 @@ public class HttpRequestSender {
String adummy = null;
StringBuilder urlPath = new StringBuilder(url);
if (!url.contains(AcmsApis.ApiUrlNewAppStoreLogin) && !url.contains(AcmsApis.ApiUrlAppStoreNewLogin) && !url.contains(AcmsApis.ApiUrlKtLogin)) {
if (!url.contains(AcmsApis.ApiUrlNewAppStoreLogin) && !url.contains(AcmsApis.ApiUrlAppStoreNewLogin)) {
adummy = ABVDataCache.getInstance().getAdummyKey();
}
......
......@@ -75,12 +75,6 @@
</intent-filter>
</receiver>
<receiver android:name="jp.agentec.abook.abv.cl.beacon.BeaconBroadcastReceiver" android:exported="false">
<intent-filter>
<action android:name="jp.agentec.abook.action.Receive_iBeacon_Message" />
</intent-filter>
</receiver>
<receiver android:name="jp.agentec.abook.abv.cl.environment.NetworkStateChangeReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
......
......@@ -58,28 +58,8 @@ android {
resValue("string", "account_path", "${account_path}")
resValue("integer", "location_mode", "${location_mode}")
resValue("integer", "view_mode_type", "${view_mode_type}")
resValue("integer", "home_toolbar_search", "${home_toolbar_search}")
resValue("integer", "home_toolbar_edit", "${home_toolbar_edit}")
resValue("integer", "home_toolbar_filter", "${home_toolbar_filter}")
resValue("integer", "home_toolbar_sort", "${home_toolbar_sort}")
resValue("integer", "home_toolbar_submenu", "${home_toolbar_submenu}")
resValue("integer", "home_menu_settting", "${home_menu_settting}")
resValue("integer", "home_title_type", "${home_title_type}")
resValue("integer", "home_qrcode", "${home_qrcode}")
resValue("integer", "filer_favorite", "${filer_favorite}")
resValue("integer", "filer_update", "${filer_update}")
resValue("integer", "filer_content_type", "${filer_content_type}")
resValue("integer", "home_menu_default", "${home_menu_default}")
resValue("integer", "home_left_menu", "${home_left_menu}")
resValue("integer", "home_right_menu", "${home_right_menu}")
resValue("integer", "home_right_menu_sort", "${home_right_menu_sort}")
resValue("integer", "home_menu_top", "${home_menu_top}")
resValue("integer", "home_menu_group", "${home_menu_group}")
resValue("integer", "home_menu_category", "${home_menu_category}")
resValue("integer", "home_menu_myfolder", "${home_menu_myfolder}")
resValue("integer", "home_menu_mydata", "${home_menu_mydata}")
resValue("integer", "home_menu_dashboard", "${home_menu_dashboard}")
resValue("integer", "home_menu_meeting", "${home_menu_meeting}")
resValue("integer", "setting_menu_general", "${setting_menu_general}")
resValue("integer", "setting_menu_viewer", "${setting_menu_viewer}")
resValue("integer", "setting_menu_account", "${setting_menu_account}")
......@@ -102,21 +82,13 @@ android {
resValue("integer", "viewer_menu_bookmark", "${viewer_menu_bookmark}")
resValue("integer", "usable_location_service", "${usable_location_service}")
resValue("integer", "usable_content_tag_search", "${usable_content_tag_search}")
resValue("integer", "show_poweredby", "${show_poweredby}")
resValue("integer", "show_poweredby_type", "${show_poweredby_type}")
resValue("integer", "push_message", "${push_message}")
resValue("integer", "check_app_update", "${check_app_update}")
resValue("integer", "show_banner", "${show_banner}")
resValue("integer", "download_service_check", "${download_service_check}")
resValue("string", "download_service_start_time", "${download_service_start_time}")
resValue("integer", "download_service_check_interval", "${download_service_check_interval}")
resValue("integer", "set_random_time", "${set_random_time}")
resValue("integer", "not_delete_all_contents", "${not_delete_all_contents}")
resValue("integer", "hide_delete_content", "${hide_delete_content}")
resValue("integer", "custom_uri_login", "${custom_uri_login}")
resValue("string", "custom_uri_id", "${custom_uri_id}")
resValue("string", "custom_uri_pwd", "${custom_uri_pwd}")
resValue("string", "custom_uri_fixed_pwd", "${custom_uri_fixed_pwd}")
resValue("integer", "edition_type", "${edition_type}")
}
sourceSets {
......@@ -127,11 +99,6 @@ android {
res.srcDir 'res'
}
}
lintOptions {
quiet true
checkReleaseBuilds false
abortOnError false
}
buildTypes {
release {
minifyEnabled false
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/app_color"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/app_color"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transparent" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transparent" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/ic_folder_add_on"/>
<item
android:drawable="@drawable/ic_folder_add_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/app_color" />
<corners
android:topLeftRadius="8dp"
android:topRightRadius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#F2F2F2" />
<corners
android:topLeftRadius="8dp"
android:topRightRadius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/icon_content_detail_check_deselected" android:state_checked="false" android:state_enabled="true"/>
<item android:drawable="@drawable/icon_content_detail_check_selected" android:state_checked="true" android:state_enabled="true" />
<item android:drawable="@drawable/icon_content_detail_check_unselect" android:state_enabled="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_content_detail_download_on"/>
<item
android:drawable="@drawable/icon_content_detail_download_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_content_detail_open_on"/>
<item
android:drawable="@drawable/icon_content_detail_open_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_content_detail_other_on"/>
<item
android:drawable="@drawable/icon_content_detail_other_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_selected="true"
android:drawable="@drawable/icon_content_detail_tab_selected"/>
<item
android:state_selected="false"
android:drawable="@drawable/icon_content_detail_tab_unselected"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_delete_on"/>
<item
android:drawable="@drawable/icon_dashboard_delete_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_fullmode_on"/>
<item
android:drawable="@drawable/icon_dashboard_fullmode_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_left_on"/>
<item
android:drawable="@drawable/icon_dashboard_left_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_normalmode_on"/>
<item
android:drawable="@drawable/icon_dashboard_normalmode_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_otherlist_add_on"/>
<item
android:drawable="@drawable/icon_dashboard_otherlist_add_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_recoder_on"/>
<item
android:drawable="@drawable/icon_dashboard_recoder_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_right_on"/>
<item
android:drawable="@drawable/icon_dashboard_right_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/icon_dashboard_setting_on"/>
<item
android:drawable="@drawable/icon_dashboard_setting_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_selected="true"
android:drawable="@color/app_color"/>
<item
android:state_selected="false"
android:drawable="@color/dashboard_tabwidget_bg"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_selected="true"
android:drawable="@drawable/ic_dashboard_widget_category_on"/>
<item
android:state_selected="false"
android:drawable="@drawable/ic_dashboard_widget_category_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_selected="true"
android:drawable="@drawable/ic_dashboard_widget_group_on"/>
<item
android:state_selected="false"
android:drawable="@drawable/ic_dashboard_widget_group_off"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_selected="true"
android:drawable="@drawable/ic_dashboard_widget_myfolder_on"/>
<item
android:state_selected="false"
android:drawable="@drawable/ic_dashboard_widget_myfolder_off"/>
</selector>
\ No newline at end of file
......@@ -9,14 +9,6 @@
<item name="android:windowBackground">@null</item>
<item name="android:windowCloseOnTouchOutside">false</item>
</style>
<style name="side_menu_button">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">left|center_vertical</item>
<item name="android:textColor">@color/sidemenu_text</item>
<item name="android:paddingLeft">65dp</item>
<item name="android:textSize">@dimen/side_menu_text_size</item>
</style>
</resources>
\ No newline at end of file
......@@ -10,57 +10,10 @@
</style>
<style name="AppTheme" parent="android:Theme.Light" />
<style name="leftBehindMenuScroll">
<item name="android:layout_width">240dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:background">@drawable/bg_side_menu_left</item>
</style>
<style name="rightBehindMenuScroll">
<item name="android:layout_width">250dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:background">@drawable/bg_side_menu_right</item>
</style>
<style name="behindMenuScrollContent">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:orientation">vertical</item>
</style>
<style name="behindMenuItemTitle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
<item name="android:textSize">20sp</item>
<item name="android:textColor">#FFFFFF</item>
</style>
<style name="behindMenuItemHeadTitle">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">15sp</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:background">#CCCCCC</item>
</style>
<style name="behindMenuItemLabel">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">#FFFFFF</item>
</style>
<style name="Theme_Contentdetailview" parent="android:style/Theme.Translucent">
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="side_menu_button">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">left|center_vertical</item>
<item name="android:textColor">@color/sidemenu_text</item>
<item name="android:paddingLeft">65dp</item>
<item name="android:textSize">15sp</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<set android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="300"/>
<!-- <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="1000" /> -->
</set>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<set android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
<translate android:fromXDelta="0" android:toXDelta="-100%p" android:duration="1000"/>
<!-- <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="1000" /> -->
</set>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<set android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
<translate android:fromXDelta="0" android:toXDelta="100%p" android:duration="1000"/>
<!-- <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="1000" /> -->
</set>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<set android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
<translate android:fromXDelta="-100%p" android:toXDelta="0" android:duration="300"/>
<!-- <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="1000" /> -->
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="800"
/>
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:interpolator="@android:anim/decelerate_interpolator"
android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="800"
/>
</set>
\ No newline at end of file
<!--
Copyright 2012 The Android Open Source Project
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.
-->
<!--
This object animator is used as a custom fragment transition. See
FragmentTransaction.setCustomAnimation for more details.
The overall effect of this animator is to rotate the back of the card
into view. The order of operations is described below:
1. The back is immediately set to transparent.
2. The invisible back rotates 90 degrees, from being fully flipped
to being zero-width, fully perpendicular to the viewer, facing right.
It is still invisible.
3. The back is then made visible (this is half-way through the
animation).
4. The back rotates another 90 degrees, from zero-width, to
100% of its normal width, facing the user.
This is accomplished using the 3 child animators below, executed in
parallel. Note that the last animator starts half-way into the animation.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Before rotating, immediately set the alpha to 0. -->
<objectAnimator
android:valueFrom="1.0"
android:valueTo="0.0"
android:propertyName="alpha"
android:duration="0" />
<!-- Rotate. -->
<objectAnimator
android:valueFrom="-180"
android:valueTo="0"
android:propertyName="rotationY"
android:interpolator="@android:interpolator/accelerate_decelerate"
android:duration="@integer/card_flip_time_full" />
<!-- Half-way through the rotation (see startOffset), set the alpha to 1. -->
<objectAnimator
android:valueFrom="0.0"
android:valueTo="1.0"
android:propertyName="alpha"
android:startOffset="@integer/card_flip_time_half"
android:duration="1" />
</set>
<!--
Copyright 2012 The Android Open Source Project
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.
-->
<!--
This object animator is used as a custom fragment transition. See
FragmentTransaction.setCustomAnimation for more details.
The overall effect of this animator is to rotate the front of the card
out of view. The order of operations is described below:
1. The front rotates 90 degrees, from facing the user to being
zero-width, fully perpendicular to the viewer, facing left.
2. The front is then made invisible (this is half-way through the
animation).
3. The front rotates another 90 degrees, from zero-width, to
100% of its normal width, but facing away from the user and
still invisible.
This is accomplished using the 2 child animators below, executed in
parallel. Note that the last animator starts half-way into the animation.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Rotate. -->
<objectAnimator
android:valueFrom="0"
android:valueTo="180"
android:propertyName="rotationY"
android:interpolator="@android:interpolator/accelerate_decelerate"
android:duration="@integer/card_flip_time_full" />
<!-- Half-way through the rotation (see startOffset), set the alpha to 0. -->
<objectAnimator
android:valueFrom="1.0"
android:valueTo="0.0"
android:propertyName="alpha"
android:startOffset="@integer/card_flip_time_half"
android:duration="1" />
</set>
<!--
Copyright 2012 The Android Open Source Project
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.
-->
<!--
This object animator is used as a custom fragment transition. See
FragmentTransaction.setCustomAnimation for more details.
The overall effect of this animator is to rotate the front of the card
into view. The order of operations is described below:
1. The front is immediately set to transparent.
2. The invisible front rotates 90 degrees, from being fully flipped
to being zero-width, fully perpendicular to the viewer, facing left.
It is still invisible.
3. The front is then made visible (this is half-way through the
animation).
4. The front rotates another 90 degrees, from zero-width, to
100% of its normal width, facing the user.
This is accomplished using the 3 child animators below, executed in
parallel. Note that the last animator starts half-way into the animation.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Before rotating, immediately set the alpha to 0. -->
<objectAnimator
android:valueFrom="1.0"
android:valueTo="0.0"
android:propertyName="alpha"
android:duration="0" />
<!-- Rotate. -->
<objectAnimator
android:valueFrom="180"
android:valueTo="0"
android:propertyName="rotationY"
android:interpolator="@android:interpolator/accelerate_decelerate"
android:duration="@integer/card_flip_time_full" />
<!-- Half-way through the rotation (see startOffset), set the alpha to 1. -->
<objectAnimator
android:valueFrom="0.0"
android:valueTo="1.0"
android:propertyName="alpha"
android:startOffset="@integer/card_flip_time_half"
android:duration="1" />
</set>
<!--
Copyright 2012 The Android Open Source Project
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.
-->
<!--
This object animator is used as a custom fragment transition. See
FragmentTransaction.setCustomAnimation for more details.
The overall effect of this animator is to rotate the back of the card
out of view. The order of operations is described below:
1. The back rotates 90 degrees, from facing the user to being
zero-width, fully perpendicular to the viewer, facing right.
2. The back is then made invisible (this is half-way through the
animation).
3. The back rotates another 90 degrees, from zero-width, to
100% of its normal width, but facing away from the user and
still invisible.
This is accomplished using the 2 child animators below, executed in
parallel. Note that the last animator starts half-way into the animation.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Rotate. -->
<objectAnimator
android:valueFrom="0"
android:valueTo="-180"
android:propertyName="rotationY"
android:interpolator="@android:interpolator/accelerate_decelerate"
android:duration="@integer/card_flip_time_full" />
<!-- Half-way through the rotation (see startOffset), set the alpha to 0. -->
<objectAnimator
android:valueFrom="1.0"
android:valueTo="0.0"
android:propertyName="alpha"
android:startOffset="@integer/card_flip_time_half"
android:duration="1" />
</set>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#d7d7d7"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/top_menu_layout"
style="@style/ToolBarHolo" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/app_name"
android:textColor="#000000"
android:textSize="@dimen/text_size_noraml" />
<ImageButton
android:id="@+id/menu_refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:onClick="onClickRefresh"
android:padding="5dp"
android:src="@drawable/refresh" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center"
android:orientation="vertical" >
<ImageButton
android:id="@+id/mettingBtn"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="1dp"
android:layout_weight="1"
android:background="@null"
android:onClick="onClickShowMeetingView"
android:scaleType="fitCenter"
android:src="@drawable/menu_meeting" />
<ImageButton
android:id="@+id/bbsBtn"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="1dp"
android:layout_weight="1"
android:background="@null"
android:onClick="onClickShowWebView"
android:scaleType="fitCenter"
android:src="@drawable/menu_bbs" />
<ImageButton
android:id="@+id/settingBtn"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="1dp"
android:layout_weight="1"
android:background="@null"
android:onClick="onClickShowSetting"
android:scaleType="fitCenter"
android:src="@drawable/menu_setting" />
</LinearLayout>
<ImageView
android:id="@+id/mainImageView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:onClick="onClickShowWebView"
android:scaleType="fitXY"
android:src="@drawable/komas_main" />
<ListView
android:id="@+id/categoryListView"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:divider="#cccccc"
android:dividerHeight="2px" >
</ListView>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment