Permalink
Browse files

Added .gitattributes

  • Loading branch information...
1 parent 7482644 commit 94ee3c534af5b986411844a55cbf9ecf72e79345 @jesse-gallagher jesse-gallagher committed Nov 3, 2012
@@ -1,7 +1,7 @@
package org.openntf.news.http.core;
/*
- * © Copyright IBM, 2012
+ * Copyright IBM, 2012
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,34 +24,34 @@
public class Click implements Serializable {
static final long serialVersionUID = 1;
-
+
private String _nID;
private String _ip;
private Date _date;
-
- public Click() {
+
+ public Click() {
}
-
+
public void setNID(String nID) {
_nID = nID;
}
-
+
public void setIP(String ip) {
_ip = ip;
}
-
+
public void setDate(Date date) {
_date = date;
}
-
+
public String getNID() {
return _nID;
}
-
+
public String getIP() {
return _ip;
}
-
+
public Date getDate() {
return _date;
}
@@ -62,7 +62,7 @@ public synchronized void addClick(Click click, boolean forceRun) {
_clicks = new HashSet<Click>();
_lastJob = new Date();
try {
- Database db = ExtLibUtil.getCurrentDatabase();
+ Database db = ExtLibUtil.getCurrentDatabase();
WriteCacheJob.start(clicksToBeSaved, db.getFilePath());
} catch (NotesException e) {
e.printStackTrace();
@@ -135,7 +135,7 @@ private synchronized void init() {
tmpEntry = viewNavigatorTypes.getNext();
entry.recycle();
entry = tmpEntry;
- }
+ }
viewCategoriesAll = db.getView("CategoriesAll");
viewCategoriesAll.setAutoUpdate(false);
@@ -155,7 +155,7 @@ private synchronized void init() {
tmpEntry = viewNavigatorCategories.getNext();
entry.recycle();
entry = tmpEntry;
- }
+ }
viewConfigAll = db.getView("ConfigAll");
viewConfigAll.setAutoUpdate(false);
@@ -168,8 +168,8 @@ private synchronized void init() {
setCaptchaPrivateKey(doc.getItemValueString("COCaptchaPrivateKey"));
_analyticsJS = doc.getItemValueString("COAnalytics");
doc.recycle();
- }
- entry.recycle();
+ }
+ entry.recycle();
}
}
catch (Exception e) {
@@ -181,29 +181,9 @@ private synchronized void init() {
return;
}
finally {
- try {
- if (viewNavigatorTypes != null) {
- viewNavigatorTypes.recycle();
- }
- if (viewNavigatorCategories != null) {
- viewNavigatorCategories.recycle();
- }
- if (viewTypesAll != null) {
- viewTypesAll.recycle();
- }
- if (viewConfigAll != null) {
- viewConfigAll.recycle();
- }
- if (viewCategoriesAll != null) {
- viewCategoriesAll.recycle();
- }
- }
- catch (NotesException e) {
- e.printStackTrace();
- return;
- }
+ MiscUtils.incinerate(viewNavigatorTypes, viewNavigatorCategories, viewTypesAll, viewConfigAll, viewCategoriesAll);
}
- _isCached = true;
+ _isCached = true;
}
private void initialize() {
@@ -251,10 +231,10 @@ public Category getCategory(String cID) {
return output;
}
- public Vector<String> getCategoriesCombobox() {
+ public Vector<String> getCategoriesCombobox() {
Vector<String> output = new Vector<String>();
output.add("Top|top");
- initialize();
+ initialize();
if (_categories != null) {
for(Category category : _categories) {
output.add(category.getDisplayName() + "|" + category.getID());
@@ -267,7 +247,7 @@ public Category getCategory(String cID) {
List<Type> output = null;
try {
String userName = MiscUtils.getCurrentCommonName();
- initialize();
+ initialize();
output = new Vector<Type>();
for(Type type : _types) {
@@ -281,11 +261,11 @@ public Category getCategory(String cID) {
return output;
}
- public Vector<Type> getTypesForCategory(String categoryId) {
+ public Vector<Type> getTypesForCategory(String categoryId) {
initialize();
Vector<Type> output = new Vector<Type>();
if (_types == null) return output;
- for(Type type : _types) {
+ for(Type type : _types) {
if (categoryId.equalsIgnoreCase(type.getCategoryId())) {
output.add(type);
}
@@ -63,7 +63,7 @@ private boolean linkAlreadyExists(String sNID, String sNTitle, String sNLink1) {
dup.setNLink(doc.getItemValueString("NLink"));
dup.setNTitle(doc.getItemValueString("NTitle"));
- duplicatesList.add(dup);
+ duplicatesList.add(dup);
}
Document tempDoc = doc;
@@ -95,7 +95,7 @@ private boolean doFuzzySearch(String sNID, String sNTitle, String sNLink) {
dup.setNLink(doc.getItemValueString("NLink"));
dup.setNTitle(doc.getItemValueString("NTitle"));
- duplicatesList.add(dup);
+ duplicatesList.add(dup);
}
Document tempDoc = doc;
@@ -169,8 +169,7 @@ private synchronized void init() {
_spotlightNewsEntries.add(newsEntry);
getTypedEntriesList(newsEntry.getTID()).add(newsEntry);
if (newsEntry.isTopStory()) {
- if (newsEntry.getTopStoryCategory().equalsIgnoreCase(
- "top")) {
+ if(newsEntry.getTopStoryCategory().equalsIgnoreCase("top")) {
_topTopStories.add(newsEntry);
} else {
getCategorizedTopEntriesList(
Oops, something went wrong.

0 comments on commit 94ee3c5

Please sign in to comment.