repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
} } finally { cursor.close(); } return token; } private void saveSyncInfo(String syncToken) { AutoEscapeValues values = new AutoEscapeValues(); values.put("token", syncToken); db.delete(TABLE_SYNC_INFO, null, null); db.insert(TABLE_SYNC_INFO, null, values.get()); } priv...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
deleteResource(id, TABLE_ASSETS);
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
CDAType type = resource.type(); LocalizedResource localized = (LocalizedResource) resource; if (type == ASSET) { saveAsset((CDAAsset) resource); } else if (type == ENTRY) { Class<?> modelClass = spaceHelper.getTypes().get(((CDAEntry) localized).contentType().id()); if (modelClass == nu...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
String whereClause = REMOTE_ID + " = ?";
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
if (type == ASSET) { saveAsset((CDAAsset) resource); } else if (type == ENTRY) { Class<?> modelClass = spaceHelper.getTypes().get(((CDAEntry) localized).contentType().id()); if (modelClass == null) { return; } ModelHelper<?> modelHelper = spaceHelper.getModels().get(modelCl...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
db.delete(TABLE_ENTRY_TYPES, whereClause, whereArgs);
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
private void deleteEntry(String id) { String contentTypeId = LinkResolver.fetchEntryType(db, id); if (contentTypeId != null) { Class<?> clazz = spaceHelper.getTypes().get(contentTypeId); if (clazz != null) { deleteResource(id, spaceHelper.getModels().get(clazz).getTableName()); del...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
db.delete(escape(localizeName(tableName, locale)), resWhere, resArgs);
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
private void deleteEntry(String id) { String contentTypeId = LinkResolver.fetchEntryType(db, id); if (contentTypeId != null) { Class<?> clazz = spaceHelper.getTypes().get(contentTypeId); if (clazz != null) { deleteResource(id, spaceHelper.getModels().get(clazz).getTableName()); del...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
db.delete(escape(localizeName(tableName, locale)), resWhere, resArgs);
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
String contentTypeId = LinkResolver.fetchEntryType(db, id); if (contentTypeId != null) { Class<?> clazz = spaceHelper.getTypes().get(contentTypeId); if (clazz != null) { deleteResource(id, spaceHelper.getModels().get(clazz).getTableName()); deleteEntryType(id); } } } p...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
db.delete(escape(localizeName(TABLE_LINKS, locale)), linksWhere, linkArgs);
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
private void saveLink(String parentId, String fieldId, String linkType, String targetId, int position, String locale) { AutoEscapeValues values = new AutoEscapeValues(); values.put("parent", parentId); values.put("field", fieldId); values.put("child", targetId); values.pu...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
values.put(CREATED_AT, (String) resource.getAttribute("createdAt"));
contentful/vault
core/src/main/java/com/contentful/vault/SyncRunnable.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import com.contentful.java.cda.CDAAsset; import com.contentful.java.cda.CDAEntry; import com.contentful.java.cda.CDA...
private void saveLink(String parentId, String fieldId, String linkType, String targetId, int position, String locale) { AutoEscapeValues values = new AutoEscapeValues(); values.put("parent", parentId); values.put("field", fieldId); values.put("child", targetId); values.put...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
values.put(UPDATED_AT, (String) resource.getAttribute("updatedAt"));
contentful/vault
core/src/main/java/com/contentful/vault/SyncConfig.java
// Path: core/src/main/templates/com/contentful/vault/build/GeneratedBuildParameters.java // public static final String PROJECT_VERSION = "${project.version}";
import com.contentful.java.cda.CDAClient; import static com.contentful.vault.build.GeneratedBuildParameters.PROJECT_VERSION; import static java.text.MessageFormat.format;
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/templates/com/contentful/vault/build/GeneratedBuildParameters.java // public static final String PROJECT_VERSION = "${project.version}"; // Path: core/src/main/java/com/contentful/vault/SyncConfig.java import com.contentful.java.cda.CDAClient; import static com.contentful.vault.build.GeneratedB...
.setIntegration("Vault", PROJECT_VERSION)
contentful/vault
core/src/main/java/com/contentful/vault/Sql.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.StringUtils; import static com.contentful.vault.BaseFields.CREATED_AT; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful.vault.BaseFields.UPDATED_AT;
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
declareField(REMOTE_ID, "STRING", false, " UNIQUE"),
contentful/vault
core/src/main/java/com/contentful/vault/Sql.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.StringUtils; import static com.contentful.vault.BaseFields.CREATED_AT; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful.vault.BaseFields.UPDATED_AT;
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
declareField(CREATED_AT, "STRING", false, null),
contentful/vault
core/src/main/java/com/contentful/vault/Sql.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.StringUtils; import static com.contentful.vault.BaseFields.CREATED_AT; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful.vault.BaseFields.UPDATED_AT;
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String CREATED_AT = "created_at"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/BaseFields.java // pu...
declareField(UPDATED_AT, "STRING", true, null),
contentful/vault
core/src/main/java/com/contentful/vault/LinkResolver.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import static com.contentful.java.cda.CDAType.ASSET; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
"SELECT `type_id` FROM %s WHERE %s = ?", TABLE_ENTRY_TYPES, REMOTE_ID);
contentful/vault
core/src/main/java/com/contentful/vault/LinkResolver.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import static com.contentful.java.cda.CDAType.ASSET; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
"SELECT `type_id` FROM %s WHERE %s = ?", TABLE_ENTRY_TYPES, REMOTE_ID);
contentful/vault
core/src/main/java/com/contentful/vault/LinkResolver.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import static com.contentful.java.cda.CDAType.ASSET; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful...
private List<Link> fetchLinks(String parentId, FieldMeta field, String locale) { List<Link> result; boolean linksToAssets = isLinkForAssets(field); String sql = linksToAssets ? queryAssetLinks(locale) : queryEntryLinks(locale); String[] args = new String[] { parentId, linksToAssets ? ...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
escape(localizeName(TABLE_LINKS, locale)),
contentful/vault
core/src/main/java/com/contentful/vault/LinkResolver.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import static com.contentful.java.cda.CDAType.ASSET; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful...
private List<Link> fetchLinks(String parentId, FieldMeta field, String locale) { List<Link> result; boolean linksToAssets = isLinkForAssets(field); String sql = linksToAssets ? queryAssetLinks(locale) : queryEntryLinks(locale); String[] args = new String[] { parentId, linksToAssets ? ...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
escape(localizeName(TABLE_LINKS, locale)),
contentful/vault
core/src/main/java/com/contentful/vault/LinkResolver.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import static com.contentful.java.cda.CDAType.ASSET; import static com.contentful.vault.BaseFields.REMOTE_ID; import static com.contentful...
private List<Link> fetchLinks(String parentId, FieldMeta field, String locale) { List<Link> result; boolean linksToAssets = isLinkForAssets(field); String sql = linksToAssets ? queryAssetLinks(locale) : queryEntryLinks(locale); String[] args = new String[] { parentId, linksToAssets ? ...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public static final String REMOTE_ID = "remote_id"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ENTRY_TYPES = "entry_types"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static final St...
escape(localizeName(TABLE_LINKS, locale)),
contentful/vault
compiler/src/test/java/com/contentful/vault/compiler/ContentTypeTest.java
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
import com.google.common.base.Joiner; import com.google.testing.compile.JavaFileObjects; import org.junit.Test; import javax.tools.JavaFileObject; import static com.contentful.vault.compiler.lib.TestUtils.processors; import static com.contentful.vault.compiler.lib.TestUtils.readTestResource; import static com.google.co...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
readTestResource("ModelInjection.java"));
contentful/vault
compiler/src/test/java/com/contentful/vault/compiler/ContentTypeTest.java
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
import com.google.common.base.Joiner; import com.google.testing.compile.JavaFileObjects; import org.junit.Test; import javax.tools.JavaFileObject; import static com.contentful.vault.compiler.lib.TestUtils.processors; import static com.contentful.vault.compiler.lib.TestUtils.readTestResource; import static com.google.co...
JavaFileObject source = JavaFileObjects.forSourceString("Test", Joiner.on('\n').join( "import com.contentful.vault.Asset;", "import com.contentful.vault.ContentType;", "import com.contentful.vault.Field;", "import com.contentful.vault.Resource;", "import com.contentful.vault....
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
.processedWith(processors())
contentful/vault
compiler/src/test/java/com/contentful/vault/compiler/FieldTest.java
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
import com.google.common.base.Joiner; import com.google.testing.compile.JavaFileObjects; import org.junit.Test; import javax.tools.JavaFileObject; import static com.contentful.vault.compiler.lib.TestUtils.processors; import static com.contentful.vault.compiler.lib.TestUtils.readTestResource; import static com.google.co...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
.processedWith(processors())
contentful/vault
compiler/src/test/java/com/contentful/vault/compiler/FieldTest.java
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
import com.google.common.base.Joiner; import com.google.testing.compile.JavaFileObjects; import org.junit.Test; import javax.tools.JavaFileObject; import static com.contentful.vault.compiler.lib.TestUtils.processors; import static com.contentful.vault.compiler.lib.TestUtils.readTestResource; import static com.google.co...
assert_().about(javaSource()).that(source) .processedWith(processors()) .failsToCompile() .withErrorContaining( "Invalid list type \"java.lang.Integer\" specified. (Test.list)"); } @Test public void testFieldsInjection() throws Exception { JavaFileObject source = JavaFil...
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
readTestResource("FieldsInjection.java"));
contentful/vault
compiler/src/main/java/com/contentful/vault/compiler/SpaceInjection.java
// Path: core/src/main/java/com/contentful/vault/ModelHelper.java // public abstract class ModelHelper<T extends Resource> { // public abstract String getTableName(); // // public abstract List<FieldMeta> getFields(); // // public abstract List<String> getCreateStatements(SpaceHelper spaceHelper); // // publ...
import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import com.contentful.vault.ModelHelper; import com.contentful.vault.Resource; import com.contentful.vault.SpaceHelper; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.Fiel...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/ModelHelper.java // public abstract class ModelHelper<T extends Resource> { // public abstract String getTableName(); // // public abstract List<FieldMeta> getFields(); // // public abstract List<String> getCreateStatements(SpaceHelper spaceHelper); // // publ...
.superclass(ClassName.get(SpaceHelper.class))
contentful/vault
compiler/src/main/java/com/contentful/vault/compiler/SpaceInjection.java
// Path: core/src/main/java/com/contentful/vault/ModelHelper.java // public abstract class ModelHelper<T extends Resource> { // public abstract String getTableName(); // // public abstract List<FieldMeta> getFields(); // // public abstract List<String> getCreateStatements(SpaceHelper spaceHelper); // // publ...
import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import com.contentful.vault.ModelHelper; import com.contentful.vault.Resource; import com.contentful.vault.SpaceHelper; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.Fiel...
appendDbVersion(builder); appendModels(builder); appendTypes(builder); appendCopyPath(builder); appendSpaceId(builder); appendLocales(builder); appendConstructor(builder); return builder; } private void appendConstructor(TypeSpec.Builder builder) { MethodSpec.Builder ctor = Met...
// Path: core/src/main/java/com/contentful/vault/ModelHelper.java // public abstract class ModelHelper<T extends Resource> { // public abstract String getTableName(); // // public abstract List<FieldMeta> getFields(); // // public abstract List<String> getCreateStatements(SpaceHelper spaceHelper); // // publ...
WildcardTypeName.subtypeOf(Resource.class));
contentful/vault
compiler/src/main/java/com/contentful/vault/compiler/SpaceInjection.java
// Path: core/src/main/java/com/contentful/vault/ModelHelper.java // public abstract class ModelHelper<T extends Resource> { // public abstract String getTableName(); // // public abstract List<FieldMeta> getFields(); // // public abstract List<String> getCreateStatements(SpaceHelper spaceHelper); // // publ...
import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import com.contentful.vault.ModelHelper; import com.contentful.vault.Resource; import com.contentful.vault.SpaceHelper; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.Fiel...
model.className); ctor.addStatement("$N.put($S, $L.class)", specTypes, model.remoteId, enclosingClassName); } builder.addMethod(ctor.build()); } private void appendTypes(TypeSpec.Builder builder) { // Field TypeName classTypeName = ParameterizedTypeName.get(ClassName.get(Class.cla...
// Path: core/src/main/java/com/contentful/vault/ModelHelper.java // public abstract class ModelHelper<T extends Resource> { // public abstract String getTableName(); // // public abstract List<FieldMeta> getFields(); // // public abstract List<String> getCreateStatements(SpaceHelper spaceHelper); // // publ...
TypeName helperTypeName = ParameterizedTypeName.get(ClassName.get(ModelHelper.class),
contentful/vault
compiler/src/test/java/com/contentful/vault/compiler/SpaceTest.java
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
import com.google.common.base.Joiner; import com.google.testing.compile.JavaFileObjects; import org.junit.Test; import javax.tools.JavaFileObject; import static com.contentful.vault.compiler.lib.TestUtils.processors; import static com.contentful.vault.compiler.lib.TestUtils.readTestResource; import static com.google.co...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
readTestResource("SpaceInjection.java"));
contentful/vault
compiler/src/test/java/com/contentful/vault/compiler/SpaceTest.java
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
import com.google.common.base.Joiner; import com.google.testing.compile.JavaFileObjects; import org.junit.Test; import javax.tools.JavaFileObject; import static com.contentful.vault.compiler.lib.TestUtils.processors; import static com.contentful.vault.compiler.lib.TestUtils.readTestResource; import static com.google.co...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static Iterable<? extends Processor> processors() { // return Arrays.asList(new Processor()); // } // // Path: compiler/src/test/java/com/contentful/vault/compiler/lib/TestUtils.java // public static String readTestResource(St...
.processedWith(processors())
contentful/vault
compiler/src/main/java/com/contentful/vault/compiler/FieldsInjection.java
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public abstract class BaseFields { // public static final String REMOTE_ID = "remote_id"; // // public static final String CREATED_AT = "created_at"; // // public static final String UPDATED_AT = "updated_at"; // } // // Path: core/src/main/ja...
import com.contentful.vault.BaseFields; import com.contentful.vault.FieldMeta; import com.google.common.base.CaseFormat; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.FieldSpec; import com.squareup.javapoet.TypeSpec; import java.util.Set; import javax.lang.model.element.Modifier; import javax.lan...
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/BaseFields.java // public abstract class BaseFields { // public static final String REMOTE_ID = "remote_id"; // // public static final String CREATED_AT = "created_at"; // // public static final String UPDATED_AT = "updated_at"; // } // // Path: core/src/main/ja...
.superclass(BaseFields.class);
contentful/vault
core/src/main/java/com/contentful/vault/AutoEscapeValues.java
// Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // }
import android.content.ContentValues; import java.util.Map; import java.util.Set; import static com.contentful.vault.Sql.escape;
/* * Copyright (C) 2018 Contentful GmbH * * 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...
// Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // } // Path: core/src/main/java/com/contentful/vault/AutoEscapeValues.java import android.content.ContentValues; import java.util.Map; import java.util.Set; import static com.cont...
values.put(escape(key), value);
contentful/vault
core/src/main/java/com/contentful/vault/QueryResolver.java
// Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ASSETS = "assets"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // } // // Path: core/src/main/java/com/contentful/vault/Sql.java // st...
import android.database.Cursor; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import static android.text.TextUtils.join; import static com.contentful.vault.Sql.TABLE_ASSETS; import static com.contentful.vault.Sql.escape; import static com.contentful.vault.Sql.localiz...
} private Map<String, Resource> cacheForType(Class<T> type) { if (type == Asset.class) { return assets; } return entries; } private void resolveLinks(List<T> resources, String locale) { LinkResolver resolver = new LinkResolver(query, assets, entries); for (T resource : resources) { ...
// Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ASSETS = "assets"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // } // // Path: core/src/main/java/com/contentful/vault/Sql.java // st...
tableName = TABLE_ASSETS;
contentful/vault
core/src/main/java/com/contentful/vault/QueryResolver.java
// Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ASSETS = "assets"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // } // // Path: core/src/main/java/com/contentful/vault/Sql.java // st...
import android.database.Cursor; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import static android.text.TextUtils.join; import static com.contentful.vault.Sql.TABLE_ASSETS; import static com.contentful.vault.Sql.escape; import static com.contentful.vault.Sql.localiz...
LinkResolver resolver = new LinkResolver(query, assets, entries); for (T resource : resources) { resolver.resolveLinks(resource, helperForEntry(resource).getFields(), locale); } } private ModelHelper<?> helperForEntry(T resource) { SpaceHelper spaceHelper = vault.getSqliteHelper().getSpaceHel...
// Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ASSETS = "assets"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // } // // Path: core/src/main/java/com/contentful/vault/Sql.java // st...
escape(localizeName(tableName, locale)),
contentful/vault
core/src/main/java/com/contentful/vault/QueryResolver.java
// Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ASSETS = "assets"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // } // // Path: core/src/main/java/com/contentful/vault/Sql.java // st...
import android.database.Cursor; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import static android.text.TextUtils.join; import static com.contentful.vault.Sql.TABLE_ASSETS; import static com.contentful.vault.Sql.escape; import static com.contentful.vault.Sql.localiz...
LinkResolver resolver = new LinkResolver(query, assets, entries); for (T resource : resources) { resolver.resolveLinks(resource, helperForEntry(resource).getFields(), locale); } } private ModelHelper<?> helperForEntry(T resource) { SpaceHelper spaceHelper = vault.getSqliteHelper().getSpaceHel...
// Path: core/src/main/java/com/contentful/vault/Sql.java // static final String TABLE_ASSETS = "assets"; // // Path: core/src/main/java/com/contentful/vault/Sql.java // static String escape(String name) { // return String.format("`%s`", name); // } // // Path: core/src/main/java/com/contentful/vault/Sql.java // st...
escape(localizeName(tableName, locale)),
nhaarman/ListViewAnimations
lib-core/src/main/java/com/nhaarman/listviewanimations/BaseAdapterDecorator.java
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/Insertable.java // public interface Insertable<T> { // // /** // * Will be called to insert given {@code item} at given {@code index} in the list. // * // * @param index the index the new item should be inserted at // * @param...
import android.database.DataSetObserver; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.BaseAdapter; import android.widget.SectionIndexer; im...
/* * Copyright 2014 Niek Haarman * * 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 ...
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/Insertable.java // public interface Insertable<T> { // // /** // * Will be called to insert given {@code item} at given {@code index} in the list. // * // * @param index the index the new item should be inserted at // * @param...
private ListViewWrapper mListViewWrapper;
nhaarman/ListViewAnimations
lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeTouchListenerTestActivity.java
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/ArrayAdapter.java // @SuppressWarnings("UnusedDeclaration") // public abstract class ArrayAdapter<T> extends BaseAdapter implements Swappable, Insertable<T> { // // @NonNull // private final List<T> mItems; // // private BaseAdapter mDataSetC...
import com.nhaarman.listviewanimations.ArrayAdapter; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.Debug; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android...
for (int i = 0; i < 20; i++) { integers.add(i); } ListAdapter myListAdapter = new MyListAdapter(this, integers); mListView.setAdapter(myListAdapter); setContentView(mListView); } @Override public boolean dispatchTouchEvent(MotionEvent ev) { int[...
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/ArrayAdapter.java // @SuppressWarnings("UnusedDeclaration") // public abstract class ArrayAdapter<T> extends BaseAdapter implements Swappable, Insertable<T> { // // @NonNull // private final List<T> mItems; // // private BaseAdapter mDataSetC...
private static class MyListAdapter extends ArrayAdapter<Integer> {
nhaarman/ListViewAnimations
example/src/main/java/com/haarman/listviewanimations/gridview/GridViewAdapter.java
// Path: example/src/main/java/com/haarman/listviewanimations/util/BitmapCache.java // public class BitmapCache extends LruCache<Integer, Bitmap> { // // private static final int KILO = 1024; // private static final int MEMORY_FACTOR = 2 * KILO; // // public BitmapCache() { // super((int) (Runtime...
import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import com.haarman.listviewanimations.R; import com.haarman.listviewanimations.util.BitmapCache; import com.nhaarman.listviewan...
/* * Copyright 2014 Niek Haarman * * 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 ...
// Path: example/src/main/java/com/haarman/listviewanimations/util/BitmapCache.java // public class BitmapCache extends LruCache<Integer, Bitmap> { // // private static final int KILO = 1024; // private static final int MEMORY_FACTOR = 2 * KILO; // // public BitmapCache() { // super((int) (Runtime...
private final BitmapCache mMemoryCache;
nhaarman/ListViewAnimations
example/src/main/java/com/haarman/listviewanimations/googlecards/GoogleCardsAdapter.java
// Path: example/src/main/java/com/haarman/listviewanimations/util/BitmapCache.java // public class BitmapCache extends LruCache<Integer, Bitmap> { // // private static final int KILO = 1024; // private static final int MEMORY_FACTOR = 2 * KILO; // // public BitmapCache() { // super((int) (Runtime...
import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.haarman.listviewanimations.R; import com.haarman...
/* * Copyright 2014 Niek Haarman * * 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 ...
// Path: example/src/main/java/com/haarman/listviewanimations/util/BitmapCache.java // public class BitmapCache extends LruCache<Integer, Bitmap> { // // private static final int KILO = 1024; // private static final int MEMORY_FACTOR = 2 * KILO; // // public BitmapCache() { // super((int) (Runtime...
private final BitmapCache mMemoryCache;
nhaarman/ListViewAnimations
lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/dragdrop/DynamicListViewTestActivity.java
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/ArrayAdapter.java // @SuppressWarnings("UnusedDeclaration") // public abstract class ArrayAdapter<T> extends BaseAdapter implements Swappable, Insertable<T> { // // @NonNull // private final List<T> mItems; // // private BaseAdapter mDataSetC...
import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.ListAda...
for (int i = 0; i < 20; i++) { integers.add(i); } ListAdapter myListAdapter = new MyListAdapter(this, integers); mListView.setAdapter(myListAdapter); setContentView(mListView); } @Override public boolean dispatchTouchEvent(MotionEvent ev) { int[...
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/ArrayAdapter.java // @SuppressWarnings("UnusedDeclaration") // public abstract class ArrayAdapter<T> extends BaseAdapter implements Swappable, Insertable<T> { // // @NonNull // private final List<T> mItems; // // private BaseAdapter mDataSetC...
private static class MyListAdapter extends ArrayAdapter<Integer> {
nhaarman/ListViewAnimations
lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SwipeUndoTouchListenerTest.java
// Path: lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeTouchListenerTestActivity.java // public class SwipeTouchListenerTestActivity extends Activity { // // private ListView mListView; // // @Override // protected void onCreate(final Bundle saved...
import android.test.ActivityInstrumentationTestCase2; import android.view.View; import android.widget.AbsListView; import com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.SwipeTouchListenerTestActivity; import com.nhaarman.listviewanimations.util.AbsListViewWrapper; import org.mockito.*; import static com....
/* * Copyright 2014 Niek Haarman * * 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 ...
// Path: lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeTouchListenerTestActivity.java // public class SwipeTouchListenerTestActivity extends Activity { // // private ListView mListView; // // @Override // protected void onCreate(final Bundle saved...
dispatchSwipeMotionEventsAndWait(getInstrumentation(), mAbsListView, 0);
nhaarman/ListViewAnimations
lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SwipeUndoTouchListenerTest.java
// Path: lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeTouchListenerTestActivity.java // public class SwipeTouchListenerTestActivity extends Activity { // // private ListView mListView; // // @Override // protected void onCreate(final Bundle saved...
import android.test.ActivityInstrumentationTestCase2; import android.view.View; import android.widget.AbsListView; import com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.SwipeTouchListenerTestActivity; import com.nhaarman.listviewanimations.util.AbsListViewWrapper; import org.mockito.*; import static com....
verify(mUndoCallback, never()).onDismiss(any(View.class), anyInt()); dispatchSwipeMotionEventsAndWait(getInstrumentation(), mAbsListView, 0); verify(mUndoCallback).onDismiss(any(View.class), eq(0)); } /** * Tests whether swiping multiple items triggers onUndoShown, but not onDism...
// Path: lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeTouchListenerTestActivity.java // public class SwipeTouchListenerTestActivity extends Activity { // // private ListView mListView; // // @Override // protected void onCreate(final Bundle saved...
dispatchSwipeMotionEvents(getInstrumentation(), mAbsListView, 0);
nhaarman/ListViewAnimations
lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SwipeUndoTouchListener.java
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/AdapterViewUtil.java // public class AdapterViewUtil { // // private AdapterViewUtil() { // } // // /** // * Returns the position within the adapter's dataset for the view, where view is an adapter item or a descendant of an adapter...
import java.util.List; import java.util.Map; import android.support.annotation.NonNull; import android.view.View; import android.view.ViewGroup; import com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.SwipeDismissTouchListener; import com.nhaarman.listviewanimations.util.AdapterViewUtil; import com.nhaarma...
restoreViewPresentations(mDismissedViews); notifyCallback(mDismissedPositions); Collection<Integer> newUndoPositions = Util.processDeletions(mUndoPositions, mDismissedPositions); mUndoPositions.clear(); mUndoPositions.addAll(newUndoPositions); mD...
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/AdapterViewUtil.java // public class AdapterViewUtil { // // private AdapterViewUtil() { // } // // /** // * Returns the position within the adapter's dataset for the view, where view is an adapter item or a descendant of an adapter...
int position = AdapterViewUtil.getPositionForView(getListViewWrapper(), view);
nhaarman/ListViewAnimations
lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/animateaddition/InsertQueue.java
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/Insertable.java // public interface Insertable<T> { // // /** // * Will be called to insert given {@code item} at given {@code index} in the list. // * // * @param index the index the new item should be inserted at // * @param...
import android.support.annotation.NonNull; import android.util.Pair; import com.nhaarman.listviewanimations.util.Insertable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.At...
/* * Copyright 2014 Niek Haarman * * 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 ...
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/Insertable.java // public interface Insertable<T> { // // /** // * Will be called to insert given {@code item} at given {@code index} in the list. // * // * @param index the index the new item should be inserted at // * @param...
private final Insertable<T> mInsertable;
nhaarman/ListViewAnimations
lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeTouchListenerTest.java
// Path: lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/MotionEventUtils.java // public static void dispatchSwipeMotionEventsAndWait(final Instrumentation instrumentation, final AbsListView absListView, final int position) throws InterruptedException { // dispatc...
import android.support.annotation.NonNull; import android.test.ActivityInstrumentationTestCase2; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import com.nhaarman.listviewanimations.util.AbsListViewWrapper; import java.util.List; import stat...
/* * Copyright 2014 Niek Haarman * * 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 ...
// Path: lib-manipulation/src/androidTest/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/MotionEventUtils.java // public static void dispatchSwipeMotionEventsAndWait(final Instrumentation instrumentation, final AbsListView absListView, final int position) throws InterruptedException { // dispatc...
dispatchSwipeMotionEventsAndWait(getInstrumentation(), mAbsListView, 0);
nhaarman/ListViewAnimations
lib-core/src/androidTest/java/com/nhaarman/listviewanimations/BaseAdapterDecoratorTest.java
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/ListViewWrapper.java // public interface ListViewWrapper { // // @NonNull // ViewGroup getListView(); // // @Nullable // View getChildAt(int index); // // int getFirstVisiblePosition(); // // int getLastVisiblePosition(); /...
import android.database.DataSetObserver; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ListView; import com.nhaarman.listviewanimations.util.AbsListViewWrapper; import com.nhaarman.listviewanimations.util.ListViewWrapper; import junit.framework.TestCas...
package com.nhaarman.listviewanimations; @SuppressWarnings({"AnonymousInnerClass", "EmptyClass", "ConstantConditions"}) public class BaseAdapterDecoratorTest extends TestCase { private BaseAdapterDecorator mBaseAdapterDecorator; private BaseAdapter mBaseAdapter; @Mock private View mView; @...
// Path: lib-core/src/main/java/com/nhaarman/listviewanimations/util/ListViewWrapper.java // public interface ListViewWrapper { // // @NonNull // ViewGroup getListView(); // // @Nullable // View getChildAt(int index); // // int getFirstVisiblePosition(); // // int getLastVisiblePosition(); /...
private ListViewWrapper mListViewWrapper;
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/command/Command.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployApplicationRequest.java // @JsonIgnoreProperties(ignoreUnknown = true) // public class DeployApplicationRequest extends ModuleRequest { // // private boolean running = false; // private String javaOpts = ""; // private Str...
import nl.jpoint.vertx.deploy.agent.request.DeployApplicationRequest; import nl.jpoint.vertx.deploy.agent.util.ExitCodes; import rx.Observable; import static rx.Observable.just;
package nl.jpoint.vertx.deploy.agent.command; @FunctionalInterface public interface Command<T> { Observable<T> executeAsync(T request);
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployApplicationRequest.java // @JsonIgnoreProperties(ignoreUnknown = true) // public class DeployApplicationRequest extends ModuleRequest { // // private boolean running = false; // private String javaOpts = ""; // private Str...
default Observable<Integer> handleExitCode(DeployApplicationRequest request, Integer exitCode) {
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/command/Command.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployApplicationRequest.java // @JsonIgnoreProperties(ignoreUnknown = true) // public class DeployApplicationRequest extends ModuleRequest { // // private boolean running = false; // private String javaOpts = ""; // private Str...
import nl.jpoint.vertx.deploy.agent.request.DeployApplicationRequest; import nl.jpoint.vertx.deploy.agent.util.ExitCodes; import rx.Observable; import static rx.Observable.just;
package nl.jpoint.vertx.deploy.agent.command; @FunctionalInterface public interface Command<T> { Observable<T> executeAsync(T request); default Observable<Integer> handleExitCode(DeployApplicationRequest request, Integer exitCode) { if (exitCode != 0) {
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployApplicationRequest.java // @JsonIgnoreProperties(ignoreUnknown = true) // public class DeployApplicationRequest extends ModuleRequest { // // private boolean running = false; // private String javaOpts = ""; // private Str...
throw new IllegalStateException("Error while initializing container " + request.getModuleId() + " with error " + ExitCodes.values()[exitCode]);
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/AwsDeployApplication.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
import io.netty.handler.codec.http.HttpResponseStatus; import io.vertx.core.AbstractVerticle; import io.vertx.core.http.HttpServer; import io.vertx.ext.web.Router; import nl.jpoint.vertx.deploy.agent.handler.*; import nl.jpoint.vertx.deploy.agent.service.*; import nl.jpoint.vertx.deploy.agent.util.LogConstants; import ...
if (deployconfig.isAwsEnabled()) { awsService = new AwsService(getVertx(), deployconfig); autoDiscoverDeployService = new AutoDiscoverDeployService(deployconfig, defaultDeployService, getVertx()); } Router router = Router.router(getVertx()); router.post("/deploy...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
LOG.info("{}: Instantiated module.", LogConstants.CLUSTER_MANAGER);
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/HttpUtils.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployState.java // public enum DeployState { // WAITING_FOR_AS_DEREGISTER, // WAITING_FOR_ELB_DEREGISTER, // DEPLOYING_CONFIGS, // STOPPING_CONTAINER, // DEPLOYING_ARTIFACTS, // DEPLOYING_APPLICATIONS, // UNKNOWN...
import com.amazonaws.util.StringUtils; import com.fasterxml.jackson.databind.ObjectMapper; import io.netty.handler.codec.http.HttpResponseStatus; import io.vertx.core.buffer.Buffer; import io.vertx.core.http.HttpServerRequest; import io.vertx.core.http.HttpServerResponse; import io.vertx.core.json.JsonArray; import io....
private static void respond(HttpServerResponse response, HttpResponseStatus code, JsonObject status) { response.setStatusCode(code.code()); if (status != null) { response.end(status.encode()); } else { response.end(); } } public static void respondOk...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployState.java // public enum DeployState { // WAITING_FOR_AS_DEREGISTER, // WAITING_FOR_ELB_DEREGISTER, // DEPLOYING_CONFIGS, // STOPPING_CONTAINER, // DEPLOYING_ARTIFACTS, // DEPLOYING_APPLICATIONS, // UNKNOWN...
public static void respondContinue(HttpServerRequest request, DeployState state) {
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/ArtifactContextUtil.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/ModuleRequest.java // public abstract class ModuleRequest { // // public static final String CONFIG_TYPE = "config"; // public static final String ZIP_TYPE = "zip"; // public static final String GZIP_TYPE = "tar.gz"; // // ...
import nl.jpoint.vertx.deploy.agent.request.ModuleRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationExcepti...
package nl.jpoint.vertx.deploy.agent.util; public class ArtifactContextUtil { public static final String ARTIFACT_CONTEXT = "artifact_context.xml"; private static final Logger LOG = LoggerFactory.getLogger(ArtifactContextUtil.class); private static final String BASE_LOCATION = "/artifact/baselocation/tex...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/ModuleRequest.java // public abstract class ModuleRequest { // // public static final String CONFIG_TYPE = "config"; // public static final String ZIP_TYPE = "zip"; // public static final String GZIP_TYPE = "tar.gz"; // // ...
public ArtifactContextUtil(ModuleRequest request, Path location) {
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/command/RunConsoleCommand.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployConfigRequest.java // public class DeployConfigRequest extends ModuleRequest { // // @JsonCreator // private DeployConfigRequest(@JsonProperty("group_id") final String groupId, @JsonProperty("artifact_id") final String artifac...
import io.vertx.rxjava.core.Vertx; import nl.jpoint.vertx.deploy.agent.request.DeployConfigRequest; import nl.jpoint.vertx.deploy.agent.util.LogConstants; import nl.jpoint.vertx.deploy.agent.util.ObservableCommand; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import rx.Observable; import static rx.Observabl...
package nl.jpoint.vertx.deploy.agent.command; public class RunConsoleCommand implements Command<DeployConfigRequest> { private static final Logger LOG = LoggerFactory.getLogger(RunConsoleCommand.class); private final String command; private final Vertx rxVertx; public RunConsoleCommand(io.vertx.co...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployConfigRequest.java // public class DeployConfigRequest extends ModuleRequest { // // @JsonCreator // private DeployConfigRequest(@JsonProperty("group_id") final String groupId, @JsonProperty("artifact_id") final String artifac...
LOG.error("[{} - {}]: Failed to run empty command.", LogConstants.CONSOLE_COMMAND, deployConfigRequest.getId());
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/command/RunConsoleCommand.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployConfigRequest.java // public class DeployConfigRequest extends ModuleRequest { // // @JsonCreator // private DeployConfigRequest(@JsonProperty("group_id") final String groupId, @JsonProperty("artifact_id") final String artifac...
import io.vertx.rxjava.core.Vertx; import nl.jpoint.vertx.deploy.agent.request.DeployConfigRequest; import nl.jpoint.vertx.deploy.agent.util.LogConstants; import nl.jpoint.vertx.deploy.agent.util.ObservableCommand; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import rx.Observable; import static rx.Observabl...
package nl.jpoint.vertx.deploy.agent.command; public class RunConsoleCommand implements Command<DeployConfigRequest> { private static final Logger LOG = LoggerFactory.getLogger(RunConsoleCommand.class); private final String command; private final Vertx rxVertx; public RunConsoleCommand(io.vertx.co...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployConfigRequest.java // public class DeployConfigRequest extends ModuleRequest { // // @JsonCreator // private DeployConfigRequest(@JsonProperty("group_id") final String groupId, @JsonProperty("artifact_id") final String artifac...
ObservableCommand<DeployConfigRequest> observableCommand = new ObservableCommand<>(deployConfigRequest, 0, rxVertx);
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployApplicationRequest.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import nl.jpoint.vertx.deploy.agent.util.LogConstants;
package nl.jpoint.vertx.deploy.agent.request; @JsonIgnoreProperties(ignoreUnknown = true) public class DeployApplicationRequest extends ModuleRequest { private boolean running = false; private String javaOpts = ""; private String instances = "1"; private String configLocation = ""; private boolea...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
return LogConstants.DEPLOY_ARTIFACT_REQUEST;
msoute/vertx-deploy-tools
vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/executor/DefaultRequestExecutor.java
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployRequest.java // @SuppressWarnings("unused") // @JsonIgnoreProperties({"endpoint"}) // public class DeployRequest { // // private static final ObjectWriter writer = new ObjectMapper().writer(); // private static final String EN...
import nl.jpoint.maven.vertx.request.DeployRequest; import nl.jpoint.maven.vertx.utils.AwsState; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org...
package nl.jpoint.maven.vertx.executor; public class DefaultRequestExecutor extends RequestExecutor { public DefaultRequestExecutor(Log log, Integer requestTimeout, Integer port, String authToken) { super(log, requestTimeout, port, authToken); }
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployRequest.java // @SuppressWarnings("unused") // @JsonIgnoreProperties({"endpoint"}) // public class DeployRequest { // // private static final ObjectWriter writer = new ObjectMapper().writer(); // private static final String EN...
private AwsState executeRequest(final HttpPost postRequest) throws MojoExecutionException {
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/MetadataXPathUtil.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/ModuleRequest.java // public abstract class ModuleRequest { // // public static final String CONFIG_TYPE = "config"; // public static final String ZIP_TYPE = "zip"; // public static final String GZIP_TYPE = "tar.gz"; // // ...
import nl.jpoint.vertx.deploy.agent.request.ModuleRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationExcepti...
package nl.jpoint.vertx.deploy.agent.util; public class MetadataXPathUtil { private static final String TIMESTAMP = "/metadata/versioning/snapshot/timestamp/text()"; private static final String BUILD_NUMBER = "/metadata/versioning/snapshot/buildNumber/text()"; private static final Logger LOG = LoggerF...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/ModuleRequest.java // public abstract class ModuleRequest { // // public static final String CONFIG_TYPE = "config"; // public static final String ZIP_TYPE = "zip"; // public static final String GZIP_TYPE = "tar.gz"; // // ...
public static String getRealSnapshotVersionFromMetadata(byte[] metadata, ModuleRequest request) {
msoute/vertx-deploy-tools
vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/executor/RequestExecutor.java
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployRequest.java // @SuppressWarnings("unused") // @JsonIgnoreProperties({"endpoint"}) // public class DeployRequest { // // private static final ObjectWriter writer = new ObjectMapper().writer(); // private static final String EN...
import com.amazonaws.util.StringUtils; import nl.jpoint.maven.vertx.request.DeployRequest; import nl.jpoint.maven.vertx.utils.AwsState; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.utils.URIBuilder; import org.apache.http.entity.BasicHttpEntity; import org.apache.maven.plugin.MojoExecut...
package nl.jpoint.maven.vertx.executor; public abstract class RequestExecutor { final Log log; private final Integer port; private final String authToken; private final long timeout; RequestExecutor(Log log, Integer requestTimeout, Integer port, String authToken) { this.log = log; ...
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployRequest.java // @SuppressWarnings("unused") // @JsonIgnoreProperties({"endpoint"}) // public class DeployRequest { // // private static final ObjectWriter writer = new ObjectMapper().writer(); // private static final String EN...
HttpPost createPost(DeployRequest deployRequest, String host) {
msoute/vertx-deploy-tools
vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/executor/RequestExecutor.java
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployRequest.java // @SuppressWarnings("unused") // @JsonIgnoreProperties({"endpoint"}) // public class DeployRequest { // // private static final ObjectWriter writer = new ObjectMapper().writer(); // private static final String EN...
import com.amazonaws.util.StringUtils; import nl.jpoint.maven.vertx.request.DeployRequest; import nl.jpoint.maven.vertx.utils.AwsState; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.utils.URIBuilder; import org.apache.http.entity.BasicHttpEntity; import org.apache.maven.plugin.MojoExecut...
log.info("Deploying to host : " + deployUri.toString()); HttpPost post = new HttpPost(deployUri); if (!StringUtils.isNullOrEmpty(authToken)) { log.info("Adding authToken to request header."); post.addHeader("authToken", authToken); } ByteArrayInputStream ...
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployRequest.java // @SuppressWarnings("unused") // @JsonIgnoreProperties({"endpoint"}) // public class DeployRequest { // // private static final ObjectWriter writer = new ObjectMapper().writer(); // private static final String EN...
public abstract AwsState executeRequest(DeployRequest deployRequest, String host, boolean ignoreFailure) throws MojoExecutionException, MojoFailureException;
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployArtifactRequest.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import nl.jpoint.vertx.deploy.agent.util.LogConstants;
package nl.jpoint.vertx.deploy.agent.request; @JsonIgnoreProperties(ignoreUnknown = true) public class DeployArtifactRequest extends ModuleRequest { @JsonCreator private DeployArtifactRequest(@JsonProperty("group_id") final String groupId, @JsonProperty("artifact_id") final String artifactId, ...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
return LogConstants.DEPLOY_ARTIFACT_REQUEST;
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/request/DeployConfigRequest.java
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import nl.jpoint.vertx.deploy.agent.util.LogConstants;
package nl.jpoint.vertx.deploy.agent.request; public class DeployConfigRequest extends ModuleRequest { @JsonCreator private DeployConfigRequest(@JsonProperty("group_id") final String groupId, @JsonProperty("artifact_id") final String artifactId, @JsonProperty("version") final ...
// Path: vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/util/LogConstants.java // public final class LogConstants { // public static final String ERROR_EXECUTING_REQUEST = "Error executing request {}."; // public static final String REQUEST_ALREADY_REGISTERED = "[{} - {}]: Request already registe...
return LogConstants.DEPLOY_CONFIG_REQUEST;
msoute/vertx-deploy-tools
vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/mojo/DeployConfiguration.java
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/utils/DeployType.java // public enum DeployType { // APPLICATION("application:"), // ARTIFACT("artifact:"), // DEFAULT(""); // // private static final String LATEST_REQUEST_TAG = "latest:version"; // private static final String ...
import nl.jpoint.maven.vertx.utils.DeployType; import nl.jpoint.maven.vertx.utils.deploy.strategy.DeployStrategyType; import org.apache.maven.model.Exclusion; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors;
package nl.jpoint.maven.vertx.mojo; public class DeployConfiguration { /** * The maven project version as String (groupId:artifactId:version) */ private String projectVersion; /** * The configuration target id **/ private String target; /** * List of hosts to deploy to ...
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/utils/DeployType.java // public enum DeployType { // APPLICATION("application:"), // ARTIFACT("artifact:"), // DEFAULT(""); // // private static final String LATEST_REQUEST_TAG = "latest:version"; // private static final String ...
private DeployStrategyType deployStrategy = DeployStrategyType.KEEP_CAPACITY;
msoute/vertx-deploy-tools
vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/mojo/DeployConfiguration.java
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/utils/DeployType.java // public enum DeployType { // APPLICATION("application:"), // ARTIFACT("artifact:"), // DEFAULT(""); // // private static final String LATEST_REQUEST_TAG = "latest:version"; // private static final String ...
import nl.jpoint.maven.vertx.utils.DeployType; import nl.jpoint.maven.vertx.utils.deploy.strategy.DeployStrategyType; import org.apache.maven.model.Exclusion; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors;
package nl.jpoint.maven.vertx.mojo; public class DeployConfiguration { /** * The maven project version as String (groupId:artifactId:version) */ private String projectVersion; /** * The configuration target id **/ private String target; /** * List of hosts to deploy to ...
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/utils/DeployType.java // public enum DeployType { // APPLICATION("application:"), // ARTIFACT("artifact:"), // DEFAULT(""); // // private static final String LATEST_REQUEST_TAG = "latest:version"; // private static final String ...
private DeployType deployType = DeployType.DEFAULT;
msoute/vertx-deploy-tools
vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/utils/LogUtil.java
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployResult.java // @JsonInclude(JsonInclude.Include.NON_NULL) // @JsonIgnoreProperties(ignoreUnknown = true) // public class DeployResult { // // // private final List<String> success; // private final Map<String, String> error; ...
import com.fasterxml.jackson.databind.ObjectMapper; import nl.jpoint.maven.vertx.request.DeployResult; import org.apache.maven.plugin.logging.Log; import java.io.IOException;
package nl.jpoint.maven.vertx.utils; public final class LogUtil { private LogUtil() { //hide } public static void logDeployResult(Log log, String result) { if (result == null || result.isEmpty()) { return; }
// Path: vertx-deploy-maven-plugin/src/main/java/nl/jpoint/maven/vertx/request/DeployResult.java // @JsonInclude(JsonInclude.Include.NON_NULL) // @JsonIgnoreProperties(ignoreUnknown = true) // public class DeployResult { // // // private final List<String> success; // private final Map<String, String> error; ...
DeployResult deployResult;
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/interfaceOfView/IWeatherMainView.java
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
import android.content.DialogInterface; import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather.model.bean.Forecast; import com.kuahusg.weather.model.bean.ForecastInfo; import java.util.List;
package com.kuahusg.weather.UI.interfaceOfView; /** * Created by kuahusg on 16-9-27. */ public interface IWeatherMainView extends IBaseView { @Override void init(); @Override void start(); @Override void finish(); void goToSelectLocationActivity(); void loadWeatherError(Strin...
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
void loadWeatherDataSourceFinish(List<Forecast> forecasts, ForecastInfo info);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/interfaceOfView/IWeatherMainView.java
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
import android.content.DialogInterface; import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather.model.bean.Forecast; import com.kuahusg.weather.model.bean.ForecastInfo; import java.util.List;
package com.kuahusg.weather.UI.interfaceOfView; /** * Created by kuahusg on 16-9-27. */ public interface IWeatherMainView extends IBaseView { @Override void init(); @Override void start(); @Override void finish(); void goToSelectLocationActivity(); void loadWeatherError(Strin...
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
void loadWeatherDataSourceFinish(List<Forecast> forecasts, ForecastInfo info);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/App.java
// Path: app/src/main/java/com/kuahusg/weather/util/CrashHandler.java // public class CrashHandler implements Thread.UncaughtExceptionHandler { // private Thread.UncaughtExceptionHandler exceptionHandler; // // @Override // public void uncaughtException(Thread thread, Throwable throwable) { // if (...
import android.app.Application; import android.content.Context; import com.kuahusg.weather.util.CrashHandler; import java.util.IllegalFormatException;
package com.kuahusg.weather; /** * Created by kuahusg on 16-4-30. */ public class App extends Application { private static Context context; // private RefWatcher watcher; @Override public void onCreate() { super.onCreate(); context = getApplicationContext();
// Path: app/src/main/java/com/kuahusg/weather/util/CrashHandler.java // public class CrashHandler implements Thread.UncaughtExceptionHandler { // private Thread.UncaughtExceptionHandler exceptionHandler; // // @Override // public void uncaughtException(Thread thread, Throwable throwable) { // if (...
CrashHandler crashHandler = CrashHandler.getInstance();
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/data/remote/WeatherService.java
// Path: app/src/main/java/com/kuahusg/weather/model/bean/AllCityResult.java // public class AllCityResult { // private String id; // private String name; // private String en; // private String parent1; // private String parent2; // private String parent3; // // public String getId() { // ...
import com.kuahusg.weather.model.bean.AllCityResult; import com.kuahusg.weather.model.bean.CitySearchResult; import com.kuahusg.weather.model.bean.WeatherResult; import java.util.List; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; import retrofit2.http.Url;
package com.kuahusg.weather.data.remote; /** * Created by kuahusg on 16-9-28. */ public interface WeatherService { @GET("/v1/public/yql")
// Path: app/src/main/java/com/kuahusg/weather/model/bean/AllCityResult.java // public class AllCityResult { // private String id; // private String name; // private String en; // private String parent1; // private String parent2; // private String parent3; // // public String getId() { // ...
Call<WeatherResult> queryWeather(@Query("q") String queryString, @Query("format") String format);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/data/remote/WeatherService.java
// Path: app/src/main/java/com/kuahusg/weather/model/bean/AllCityResult.java // public class AllCityResult { // private String id; // private String name; // private String en; // private String parent1; // private String parent2; // private String parent3; // // public String getId() { // ...
import com.kuahusg.weather.model.bean.AllCityResult; import com.kuahusg.weather.model.bean.CitySearchResult; import com.kuahusg.weather.model.bean.WeatherResult; import java.util.List; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; import retrofit2.http.Url;
package com.kuahusg.weather.data.remote; /** * Created by kuahusg on 16-9-28. */ public interface WeatherService { @GET("/v1/public/yql") Call<WeatherResult> queryWeather(@Query("q") String queryString, @Query("format") String format); @GET()
// Path: app/src/main/java/com/kuahusg/weather/model/bean/AllCityResult.java // public class AllCityResult { // private String id; // private String name; // private String en; // private String parent1; // private String parent2; // private String parent3; // // public String getId() { // ...
Call<List<AllCityResult>> queryAllMainCity(@Url String url);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/data/remote/WeatherService.java
// Path: app/src/main/java/com/kuahusg/weather/model/bean/AllCityResult.java // public class AllCityResult { // private String id; // private String name; // private String en; // private String parent1; // private String parent2; // private String parent3; // // public String getId() { // ...
import com.kuahusg.weather.model.bean.AllCityResult; import com.kuahusg.weather.model.bean.CitySearchResult; import com.kuahusg.weather.model.bean.WeatherResult; import java.util.List; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; import retrofit2.http.Url;
package com.kuahusg.weather.data.remote; /** * Created by kuahusg on 16-9-28. */ public interface WeatherService { @GET("/v1/public/yql") Call<WeatherResult> queryWeather(@Query("q") String queryString, @Query("format") String format); @GET() Call<List<AllCityResult>> queryAllMainCity(@Url Strin...
// Path: app/src/main/java/com/kuahusg/weather/model/bean/AllCityResult.java // public class AllCityResult { // private String id; // private String name; // private String en; // private String parent1; // private String parent2; // private String parent3; // // public String getId() { // ...
Call<CitySearchResult> queryCity(@Query("q") String queryString, @Query("format") String format);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/AboutMePresenterImpl.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
import android.app.Activity; import android.content.Intent; import android.net.Uri; import com.kuahusg.weather.Presenter.base.BasePresenter; import com.kuahusg.weather.Presenter.interfaceOfPresenter.IAboutMePresenter; import com.kuahusg.weather.R; import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather...
package com.kuahusg.weather.Presenter; /** * Created by kuahusg on 16-9-27. */ public class AboutMePresenterImpl extends BasePresenter implements IAboutMePresenter { private IAboutMeView mView;
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
public AboutMePresenterImpl(IBaseView view) {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/AboutMePresenterImpl.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
import android.app.Activity; import android.content.Intent; import android.net.Uri; import com.kuahusg.weather.Presenter.base.BasePresenter; import com.kuahusg.weather.Presenter.interfaceOfPresenter.IAboutMePresenter; import com.kuahusg.weather.R; import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather...
package com.kuahusg.weather.Presenter; /** * Created by kuahusg on 16-9-27. */ public class AboutMePresenterImpl extends BasePresenter implements IAboutMePresenter { private IAboutMeView mView; public AboutMePresenterImpl(IBaseView view) { super(view); mView = (IAboutMeView) view; } ...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
protected IDataSource setDataSource() {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/receiver/BootCompleteReciver.java
// Path: app/src/main/java/com/kuahusg/weather/service/AutoUpdateService.java // public class AutoUpdateService extends Service { // private double time = 2; // // // private IDataSource dataSource = new WeatherDataSource(new RemoteForecastDataSource(), new LocalForecastDataSource()); // private WeakRef...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.kuahusg.weather.service.AutoUpdateService; import com.kuahusg.weather.util.PreferenceUtil;
package com.kuahusg.weather.receiver; /** * Created by kuahusg on 16-6-21. * com.kuahusg.weather.receiver */ public class BootCompleteReciver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { // LogUtil.v(this.toString(), "boot complete,start service");
// Path: app/src/main/java/com/kuahusg/weather/service/AutoUpdateService.java // public class AutoUpdateService extends Service { // private double time = 2; // // // private IDataSource dataSource = new WeatherDataSource(new RemoteForecastDataSource(), new LocalForecastDataSource()); // private WeakRef...
if (PreferenceUtil.getCanAutoUpdate()) {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/receiver/BootCompleteReciver.java
// Path: app/src/main/java/com/kuahusg/weather/service/AutoUpdateService.java // public class AutoUpdateService extends Service { // private double time = 2; // // // private IDataSource dataSource = new WeatherDataSource(new RemoteForecastDataSource(), new LocalForecastDataSource()); // private WeakRef...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.kuahusg.weather.service.AutoUpdateService; import com.kuahusg.weather.util.PreferenceUtil;
package com.kuahusg.weather.receiver; /** * Created by kuahusg on 16-6-21. * com.kuahusg.weather.receiver */ public class BootCompleteReciver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { // LogUtil.v(this.toString(), "boot complete,start service"); ...
// Path: app/src/main/java/com/kuahusg/weather/service/AutoUpdateService.java // public class AutoUpdateService extends Service { // private double time = 2; // // // private IDataSource dataSource = new WeatherDataSource(new RemoteForecastDataSource(), new LocalForecastDataSource()); // private WeakRef...
Intent intent1 = new Intent(context, AutoUpdateService.class);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/interfaceOfPresenter/ISelectLocationPresenter.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/IBasePresenter.java // public interface IBasePresenter { // // void init(); // // void start(); // // void onDestroy(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/City.java // public class City implements Serializable{ ...
import android.app.Activity; import com.kuahusg.weather.Presenter.base.IBasePresenter; import com.kuahusg.weather.model.bean.City;
package com.kuahusg.weather.Presenter.interfaceOfPresenter; /** * Created by kuahusg on 16-9-27. */ public interface ISelectLocationPresenter extends IBasePresenter { @Override void init(); @Override void start(); @Override void onDestroy(); void onClickQueryButton(String cityNameTo...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/IBasePresenter.java // public interface IBasePresenter { // // void init(); // // void start(); // // void onDestroy(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/City.java // public class City implements Serializable{ ...
void onClickResultCityItem(City selectedCity, Activity activity);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/WeatherFragPresenterImpl.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.kuahusg.weather.Presenter.base.BasePresenter; import com.kuahusg.weather.Presenter.interfaceOfPresenter.IWeatherMainFragPresenter; import com.kuahusg.weathe...
package com.kuahusg.weather.Presenter; /** * Created by kuahusg on 16-9-29. */ public class WeatherFragPresenterImpl extends BasePresenter implements IWeatherMainFragPresenter { private IWeatherFragView mView;
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
public WeatherFragPresenterImpl(IBaseView view) {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/WeatherFragPresenterImpl.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.kuahusg.weather.Presenter.base.BasePresenter; import com.kuahusg.weather.Presenter.interfaceOfPresenter.IWeatherMainFragPresenter; import com.kuahusg.weathe...
package com.kuahusg.weather.Presenter; /** * Created by kuahusg on 16-9-29. */ public class WeatherFragPresenterImpl extends BasePresenter implements IWeatherMainFragPresenter { private IWeatherFragView mView; public WeatherFragPresenterImpl(IBaseView view) { super(view); mView = (IWeath...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
protected IDataSource setDataSource() {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/WeatherFragPresenterImpl.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.kuahusg.weather.Presenter.base.BasePresenter; import com.kuahusg.weather.Presenter.interfaceOfPresenter.IWeatherMainFragPresenter; import com.kuahusg.weathe...
package com.kuahusg.weather.Presenter; /** * Created by kuahusg on 16-9-29. */ public class WeatherFragPresenterImpl extends BasePresenter implements IWeatherMainFragPresenter { private IWeatherFragView mView; public WeatherFragPresenterImpl(IBaseView view) { super(view); mView = (IWeath...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
loadPicture(DateUtil.getDate("yy-MM-dd", i), imageViewToLoadImage);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/util/CrashHandler.java
// Path: app/src/main/java/com/kuahusg/weather/App.java // public class App extends Application { // private static Context context; // // private RefWatcher watcher; // // @Override // public void onCreate() { // super.onCreate(); // context = getApplicationContext(); // // Cra...
import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.drawable.Icon; import android.net.Uri; import android.os.Build; import android.os.En...
Process.killProcess(Process.myPid()); System.exit(10); } } private CrashHandler() { } public void init() { InstanceHolder.INSTANCE.exceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(this); } ...
// Path: app/src/main/java/com/kuahusg/weather/App.java // public class App extends Application { // private static Context context; // // private RefWatcher watcher; // // @Override // public void onCreate() { // super.onCreate(); // context = getApplicationContext(); // // Cra...
final String toastMessage = App.getContext().getString(R.string.crash_message);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/activities/SettingActivity.java
// Path: app/src/main/java/com/kuahusg/weather/UI/Fragment/SettingFragment.java // public class SettingFragment extends PreferenceFragment implements Preference.OnPreferenceChangeListener { // public static final String AUTO_UPDATE = "auto_update"; // public static final String UPDATE_TIME = "update_time"; // ...
import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import com.kuahusg.weather.R; import com.kuahusg.weather.UI.Fragment.SettingFragment;
package com.kuahusg.weather.UI.activities; /** * Created by kuahusg on 16-6-10. * com.kuahusg.weather.UI.activities */ public class SettingActivity extends AppCompatActivity { private Toolbar toolbar; @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { ...
// Path: app/src/main/java/com/kuahusg/weather/UI/Fragment/SettingFragment.java // public class SettingFragment extends PreferenceFragment implements Preference.OnPreferenceChangeListener { // public static final String AUTO_UPDATE = "auto_update"; // public static final String UPDATE_TIME = "update_time"; // ...
getFragmentManager().beginTransaction().replace(R.id.setting_part, new SettingFragment()).commit();
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/receiver/AutoUpdateReceiver.java
// Path: app/src/main/java/com/kuahusg/weather/service/AutoUpdateService.java // public class AutoUpdateService extends Service { // private double time = 2; // // // private IDataSource dataSource = new WeatherDataSource(new RemoteForecastDataSource(), new LocalForecastDataSource()); // private WeakRef...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.kuahusg.weather.service.AutoUpdateService;
package com.kuahusg.weather.receiver; /** * Created by kuahusg on 16-5-10. */ public class AutoUpdateReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) {
// Path: app/src/main/java/com/kuahusg/weather/service/AutoUpdateService.java // public class AutoUpdateService extends Service { // private double time = 2; // // // private IDataSource dataSource = new WeatherDataSource(new RemoteForecastDataSource(), new LocalForecastDataSource()); // private WeakRef...
Intent intent1 = new Intent(context, AutoUpdateService.class);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/interfaceOfView/IWeatherFragView.java
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather.model.bean.Forecast; import com.kuahusg.weather.model.bean.ForecastInfo; import java.util.List;
package com.kuahusg.weather.UI.interfaceOfView; /** * Created by kuahusg on 16-9-29. */ public interface IWeatherFragView extends IBaseView { void showWeather(List<Forecast> forecastList);
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
void showForecastInfo(ForecastInfo info);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/interfaceOfView/IFutureWeatherFragView.java
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather.model.bean.Forecast; import java.util.List;
package com.kuahusg.weather.UI.interfaceOfView; /** * Created by kuahusg on 16-9-29. */ public interface IFutureWeatherFragView extends IBaseView { @Override void start(); @Override void error(String message); @Override void finish(); @Override void init();
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast im...
void showForecast(List<Forecast> forecastList);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/util/PreferenceUtil.java
// Path: app/src/main/java/com/kuahusg/weather/App.java // public class App extends Application { // private static Context context; // // private RefWatcher watcher; // // @Override // public void onCreate() { // super.onCreate(); // context = getApplicationContext(); // // Cra...
import android.content.SharedPreferences; import android.preference.PreferenceManager; import com.kuahusg.weather.App;
package com.kuahusg.weather.util; /** * Created by kuahusg on 16-9-27. */ public class PreferenceUtil { SharedPreferences sharedPreferences; SharedPreferences.Editor editor; public static final String PREF_HAS_LOAD_ALL_CITY = "hasLoadAllCity"; public static final String PREF_SELECTED_CITY = "selec...
// Path: app/src/main/java/com/kuahusg/weather/App.java // public class App extends Application { // private static Context context; // // private RefWatcher watcher; // // @Override // public void onCreate() { // super.onCreate(); // context = getApplicationContext(); // // Cra...
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(App.getContext());
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/Adapter/RvAdapter.java
// Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast implements Parcelable{ // public static final Parcelable.Creator<Forecast> CREATOR = new Creator<Forecast>() { // @Override // public Forecast createFromParcel(Parcel source) { // Forecast fo...
import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; import android.widget.TextVi...
if (info.contains("Thunderstorms")) { img.setImageResource(R.drawable.thunderstorm); } else if (info.contains("Cloudy")) { img.setImageResource(R.drawable.cloud_sun); } else if (info.contains("Sunny")) { img.setImageResource(R.drawable.sunny); } els...
// Path: app/src/main/java/com/kuahusg/weather/model/bean/Forecast.java // public class Forecast implements Parcelable{ // public static final Parcelable.Creator<Forecast> CREATOR = new Creator<Forecast>() { // @Override // public Forecast createFromParcel(Parcel source) { // Forecast fo...
Animation animation = AnimationUtils.loadAnimation(getContext(), animId);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/activities/AboutMeActivity.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/AboutMePresenterImpl.java // public class AboutMePresenterImpl extends BasePresenter implements IAboutMePresenter { // private IAboutMeView mView; // // public AboutMePresenterImpl(IBaseView view) { // super(view); // mView = (IAboutMeVie...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.CollapsingToolbarLayout; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.ActionBar; import android.support.v7.widget.Toolbar; import android.view.View; import com.kuahusg.w...
package com.kuahusg.weather.UI.activities; /** * Created by kuahusg on 16-9-27. */ public class AboutMeActivity extends BaseActivity implements IAboutMeView { private IAboutMePresenter mPresenter; private Toolbar mToolbar; private FloatingActionButton mFab; private CollapsingToolbarLayout mCollaps...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/AboutMePresenterImpl.java // public class AboutMePresenterImpl extends BasePresenter implements IAboutMePresenter { // private IAboutMeView mView; // // public AboutMePresenterImpl(IBaseView view) { // super(view); // mView = (IAboutMeVie...
protected IBasePresenter setPresenter() {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/activities/AboutMeActivity.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/AboutMePresenterImpl.java // public class AboutMePresenterImpl extends BasePresenter implements IAboutMePresenter { // private IAboutMeView mView; // // public AboutMePresenterImpl(IBaseView view) { // super(view); // mView = (IAboutMeVie...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.CollapsingToolbarLayout; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.ActionBar; import android.support.v7.widget.Toolbar; import android.view.View; import com.kuahusg.w...
package com.kuahusg.weather.UI.activities; /** * Created by kuahusg on 16-9-27. */ public class AboutMeActivity extends BaseActivity implements IAboutMeView { private IAboutMePresenter mPresenter; private Toolbar mToolbar; private FloatingActionButton mFab; private CollapsingToolbarLayout mCollaps...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/AboutMePresenterImpl.java // public class AboutMePresenterImpl extends BasePresenter implements IAboutMePresenter { // private IAboutMeView mView; // // public AboutMePresenterImpl(IBaseView view) { // super(view); // mView = (IAboutMeVie...
mPresenter = new AboutMePresenterImpl(this);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/FutureWeatherFragPresenterImpl.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
import com.kuahusg.weather.Presenter.base.BasePresenter; import com.kuahusg.weather.Presenter.interfaceOfPresenter.IFutureWeatherFragPresenter; import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather.UI.interfaceOfView.IFutureWeatherFragView; import com.kuahusg.weather.data.IDataSource;
package com.kuahusg.weather.Presenter; /** * Created by kuahusg on 16-9-29. */ public class FutureWeatherFragPresenterImpl extends BasePresenter implements IFutureWeatherFragPresenter { private IFutureWeatherFragView mView;
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
public FutureWeatherFragPresenterImpl(IBaseView view) {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/FutureWeatherFragPresenterImpl.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
import com.kuahusg.weather.Presenter.base.BasePresenter; import com.kuahusg.weather.Presenter.interfaceOfPresenter.IFutureWeatherFragPresenter; import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather.UI.interfaceOfView.IFutureWeatherFragView; import com.kuahusg.weather.data.IDataSource;
package com.kuahusg.weather.Presenter; /** * Created by kuahusg on 16-9-29. */ public class FutureWeatherFragPresenterImpl extends BasePresenter implements IFutureWeatherFragPresenter { private IFutureWeatherFragView mView; public FutureWeatherFragPresenterImpl(IBaseView view) { super(view); ...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/BasePresenter.java // public abstract class BasePresenter implements IBasePresenter { // // private IBaseView mView; // // private IDataSource dataSource; // private WeakReference<IDataSource> dataSourceWeakReference; // // public BasePr...
protected IDataSource setDataSource() {
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/Presenter/interfaceOfPresenter/IWeatherViewPresenter.java
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/IBasePresenter.java // public interface IBasePresenter { // // void init(); // // void start(); // // void onDestroy(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/City.java // public class City implements Serializable{ ...
import com.kuahusg.weather.Presenter.base.IBasePresenter; import com.kuahusg.weather.model.bean.City;
package com.kuahusg.weather.Presenter.interfaceOfPresenter; /** * Created by kuahusg on 16-9-27. */ public interface IWeatherViewPresenter extends IBasePresenter { @Override void init(); @Override void start(); @Override void onDestroy(); void startAutoUpdateService(); void on...
// Path: app/src/main/java/com/kuahusg/weather/Presenter/base/IBasePresenter.java // public interface IBasePresenter { // // void init(); // // void start(); // // void onDestroy(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/City.java // public class City implements Serializable{ ...
void refreshWeather(City city);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/data/IDataSource.java
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
import com.kuahusg.weather.data.callback.RequestCityCallback; import com.kuahusg.weather.data.callback.RequestCityResultCallback; import com.kuahusg.weather.data.callback.RequestWeatherCallback; import com.kuahusg.weather.model.bean.Forecast; import com.kuahusg.weather.model.bean.ForecastInfo; import java.util.List;
package com.kuahusg.weather.data; /** * Created by kuahusg on 16-9-28. */ public interface IDataSource { void queryWeather(String woeid, RequestWeatherCallback callback); void queryWeather(RequestWeatherCallback callback);
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
void saveWeather(List<Forecast> forecastList, ForecastInfo info);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/data/IDataSource.java
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
import com.kuahusg.weather.data.callback.RequestCityCallback; import com.kuahusg.weather.data.callback.RequestCityResultCallback; import com.kuahusg.weather.data.callback.RequestWeatherCallback; import com.kuahusg.weather.model.bean.Forecast; import com.kuahusg.weather.model.bean.ForecastInfo; import java.util.List;
package com.kuahusg.weather.data; /** * Created by kuahusg on 16-9-28. */ public interface IDataSource { void queryWeather(String woeid, RequestWeatherCallback callback); void queryWeather(RequestWeatherCallback callback);
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
void saveWeather(List<Forecast> forecastList, ForecastInfo info);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/data/IDataSource.java
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
import com.kuahusg.weather.data.callback.RequestCityCallback; import com.kuahusg.weather.data.callback.RequestCityResultCallback; import com.kuahusg.weather.data.callback.RequestWeatherCallback; import com.kuahusg.weather.model.bean.Forecast; import com.kuahusg.weather.model.bean.ForecastInfo; import java.util.List;
package com.kuahusg.weather.data; /** * Created by kuahusg on 16-9-28. */ public interface IDataSource { void queryWeather(String woeid, RequestWeatherCallback callback); void queryWeather(RequestWeatherCallback callback); void saveWeather(List<Forecast> forecastList, ForecastInfo info);
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
void loadAllCity(RequestCityCallback cityCallback);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/data/IDataSource.java
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
import com.kuahusg.weather.data.callback.RequestCityCallback; import com.kuahusg.weather.data.callback.RequestCityResultCallback; import com.kuahusg.weather.data.callback.RequestWeatherCallback; import com.kuahusg.weather.model.bean.Forecast; import com.kuahusg.weather.model.bean.ForecastInfo; import java.util.List;
package com.kuahusg.weather.data; /** * Created by kuahusg on 16-9-28. */ public interface IDataSource { void queryWeather(String woeid, RequestWeatherCallback callback); void queryWeather(RequestWeatherCallback callback); void saveWeather(List<Forecast> forecastList, ForecastInfo info); void ...
// Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityCallback.java // public interface RequestCityCallback { // void success(List<String> cityList); // // void error(); // } // // Path: app/src/main/java/com/kuahusg/weather/data/callback/RequestCityResultCallback.java // public interface Re...
void queryCity(RequestCityResultCallback callback, String cityName);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/interfaceOfView/ISelectLocationView.java
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/City.java // public class City implements...
import com.kuahusg.weather.UI.base.IBaseView; import com.kuahusg.weather.model.bean.City; import java.util.List;
package com.kuahusg.weather.UI.interfaceOfView; /** * Created by kuahusg on 16-9-27. */ public interface ISelectLocationView extends IBaseView { @Override void start(); @Override void finish(); @Override void init(); @Override void error(String message); void queryCityErro...
// Path: app/src/main/java/com/kuahusg/weather/UI/base/IBaseView.java // public interface IBaseView { // void init(); // // void start(); // // void error(String message); // // void finish(); // } // // Path: app/src/main/java/com/kuahusg/weather/model/bean/City.java // public class City implements...
void finishQueryCity(List<City> list);
Kuanghusing/Weather
app/src/main/java/com/kuahusg/weather/UI/Widget/BackgroundPictureView.java
// Path: app/src/main/java/com/kuahusg/weather/util/LogUtil.java // public class LogUtil { // public static final int VERBOSE = 1; // public static final int DEBUG = 2; // public static final int INFO = 3; // public static final int WARN = 4; // public static final int ERROR = 5; // public stati...
import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import com.kuahusg.weather.R; import com.kuahusg.weather.util.LogUtil;
package com.kuahusg.weather.UI.Widget; /** * Created by kuahusg on 16-6-29. * com.kuahusg.weather.UI */ public class BackgroundPictureView extends LinearLayout implements View.OnClickListener { // TODO: 16-10-12 这个View应该添加更多其他控件,并设计成可复用 LinearLayout container; Context mContext; ImageView imageView...
// Path: app/src/main/java/com/kuahusg/weather/util/LogUtil.java // public class LogUtil { // public static final int VERBOSE = 1; // public static final int DEBUG = 2; // public static final int INFO = 3; // public static final int WARN = 4; // public static final int ERROR = 5; // public stati...
LogUtil.v(this.toString(),"onClick()");
ivargrimstad/snoopee
snoopee-config/snoopee-config-service/src/main/java/eu/agilejava/snoopee/config/ApplicationConfig.java
// Path: snoopee-config/snoopee-config-service/src/main/java/eu/agilejava/snoopee/config/api/ConfigurationsResource.java // @Path("services") // public class ConfigurationsResource { // // @GET // @Path("{serviceName}/configurations") // @Produces(MediaType.APPLICATION_JSON) // public Response getConfi...
import eu.agilejava.snoopee.annotation.EnableSnoopEEClient; import eu.agilejava.snoopee.config.api.ConfigurationsResource; import java.util.HashSet; import java.util.Set; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application;
/* * The MIT License * * Copyright 2017 Ivar Grimstad (ivar.grimstad@cybercom.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation ...
// Path: snoopee-config/snoopee-config-service/src/main/java/eu/agilejava/snoopee/config/api/ConfigurationsResource.java // @Path("services") // public class ConfigurationsResource { // // @GET // @Path("{serviceName}/configurations") // @Produces(MediaType.APPLICATION_JSON) // public Response getConfi...
resources.add(ConfigurationsResource.class);
ivargrimstad/snoopee
snoopee-discovery/snoopee/src/main/java/eu/agilejava/snoopee/scan/SnoopEERegistrationClient.java
// Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java // public final class SnoopEEExtensionHelper { // // private String serviceName; // private boolean snoopEnabled; // // private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper...
import eu.agilejava.snoopee.SnoopEEExtensionHelper; import com.fasterxml.jackson.dataformat.yaml.snakeyaml.Yaml; import com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.YAMLException; import eu.agilejava.snoopee.SnoopEEConfigurationException; import eu.agilejava.snoopee.client.SnoopEEConfig; import java.io.IOExcep...
/* * The MIT License * * Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
// Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java // public final class SnoopEEExtensionHelper { // // private String serviceName; // private boolean snoopEnabled; // // private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper...
private final SnoopEEConfig applicationConfig = new SnoopEEConfig();
ivargrimstad/snoopee
snoopee-discovery/snoopee/src/main/java/eu/agilejava/snoopee/scan/SnoopEERegistrationClient.java
// Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java // public final class SnoopEEExtensionHelper { // // private String serviceName; // private boolean snoopEnabled; // // private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper...
import eu.agilejava.snoopee.SnoopEEExtensionHelper; import com.fasterxml.jackson.dataformat.yaml.snakeyaml.Yaml; import com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.YAMLException; import eu.agilejava.snoopee.SnoopEEConfigurationException; import eu.agilejava.snoopee.client.SnoopEEConfig; import java.io.IOExcep...
/* * The MIT License * * Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
// Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java // public final class SnoopEEExtensionHelper { // // private String serviceName; // private boolean snoopEnabled; // // private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper...
if (SnoopEEExtensionHelper.isSnoopEnabled()) {
ivargrimstad/snoopee
snoopee-discovery/snoopee/src/main/java/eu/agilejava/snoopee/scan/SnoopEERegistrationClient.java
// Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java // public final class SnoopEEExtensionHelper { // // private String serviceName; // private boolean snoopEnabled; // // private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper...
import eu.agilejava.snoopee.SnoopEEExtensionHelper; import com.fasterxml.jackson.dataformat.yaml.snakeyaml.Yaml; import com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.YAMLException; import eu.agilejava.snoopee.SnoopEEConfigurationException; import eu.agilejava.snoopee.client.SnoopEEConfig; import java.io.IOExcep...
/* * The MIT License * * Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
// Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java // public final class SnoopEEExtensionHelper { // // private String serviceName; // private boolean snoopEnabled; // // private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper...
} catch (SnoopEEConfigurationException e) {
ivargrimstad/snoopee
snoopee-config/snoopee-config-service/src/main/java/eu/agilejava/snoopee/config/api/ConfigurationsResource.java
// Path: snoopee-config/snoopee-config-client/src/main/java/eu/agilejava/snoopee/config/Configuration.java // @XmlRootElement // @XmlAccessorType(XmlAccessType.FIELD) // public class Configuration { // // private String key; // private String value; // // Configuration() { // } // // publ...
import javax.ws.rs.core.GenericEntity; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import eu.agilejava.snoopee.config.Configuration; import java.util.ArrayList; import java.util.List; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces;
/* * The MIT License * * Copyright 2017 Ivar Grimstad (ivar.grimstad@cybercom.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation ...
// Path: snoopee-config/snoopee-config-client/src/main/java/eu/agilejava/snoopee/config/Configuration.java // @XmlRootElement // @XmlAccessorType(XmlAccessType.FIELD) // public class Configuration { // // private String key; // private String value; // // Configuration() { // } // // publ...
List<Configuration> configurations = new ArrayList<>();
ivargrimstad/snoopee
snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEStatusEndpoint.java
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEConfig.java // public static SnoopEEConfig fromJSON(String json) { // // SnoopEEConfig config = new SnoopEEConfig(); // // try (JsonReader reader = Json.createReader(new StringReader(json))) { // // JsonObject configJson...
import static eu.agilejava.snoopee.SnoopEEConfig.fromJSON; import java.util.logging.Logger; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.websocket.OnMessage; import javax.websocket.server.PathParam; import javax.websocket.server.ServerEndpoint;
/* * The MIT License * * Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEConfig.java // public static SnoopEEConfig fromJSON(String json) { // // SnoopEEConfig config = new SnoopEEConfig(); // // try (JsonReader reader = Json.createReader(new StringReader(json))) { // // JsonObject configJson...
clients.register(fromJSON(applicationConfig));
ivargrimstad/snoopee
snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/ui/SnoopController.java
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java // @Singleton // public class SnoopEEClientRegistry { // // private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee"); // // private final Map<String, Long> clients = new ConcurrentHashMa...
import javax.inject.Named; import eu.agilejava.snoopee.SnoopEEClientRegistry; import eu.agilejava.snoopee.SnoopEEConfig; import java.util.Collection; import java.util.Set; import java.util.logging.Logger; import javax.ejb.EJB; import javax.enterprise.context.RequestScoped;
/* * The MIT License * * Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java // @Singleton // public class SnoopEEClientRegistry { // // private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee"); // // private final Map<String, Long> clients = new ConcurrentHashMa...
private SnoopEEClientRegistry clients;
ivargrimstad/snoopee
snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/ui/SnoopController.java
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java // @Singleton // public class SnoopEEClientRegistry { // // private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee"); // // private final Map<String, Long> clients = new ConcurrentHashMa...
import javax.inject.Named; import eu.agilejava.snoopee.SnoopEEClientRegistry; import eu.agilejava.snoopee.SnoopEEConfig; import java.util.Collection; import java.util.Set; import java.util.logging.Logger; import javax.ejb.EJB; import javax.enterprise.context.RequestScoped;
/* * The MIT License * * Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java // @Singleton // public class SnoopEEClientRegistry { // // private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee"); // // private final Map<String, Long> clients = new ConcurrentHashMa...
public Collection<SnoopEEConfig> getClientConfigurations() {
ivargrimstad/snoopee
snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/api/ServicesResource.java
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java // @Singleton // public class SnoopEEClientRegistry { // // private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee"); // // private final Map<String, Long> clients = new ConcurrentHashMa...
import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.GenericEntity; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; import javax.ws.rs.core.Response; import javax.ws.rs.cor...
/* * The MIT License * * Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
// Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java // @Singleton // public class SnoopEEClientRegistry { // // private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee"); // // private final Map<String, Long> clients = new ConcurrentHashMa...
private SnoopEEClientRegistry snoopeeClientRegistry;