Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo
Commits
33aa1635
Commit
33aa1635
authored
Jun 28, 2012
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c
parent
3fab14b0
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2917 additions
and
2882 deletions
+2917
-2882
core/src/main/java/org/b3log/solo/processor/ArticleProcessor.java
.../main/java/org/b3log/solo/processor/ArticleProcessor.java
+1167
-1167
core/src/main/java/org/b3log/solo/service/PluginMgmtService.java
...c/main/java/org/b3log/solo/service/PluginMgmtService.java
+152
-152
core/src/main/java/org/b3log/solo/service/PluginQueryService.java
.../main/java/org/b3log/solo/service/PluginQueryService.java
+162
-162
core/src/main/java/org/b3log/solo/service/PreferenceMgmtService.java
...in/java/org/b3log/solo/service/PreferenceMgmtService.java
+241
-241
core/src/main/java/org/b3log/solo/service/PreferenceQueryService.java
...n/java/org/b3log/solo/service/PreferenceQueryService.java
+120
-120
core/src/main/java/org/b3log/solo/service/TagMgmtService.java
.../src/main/java/org/b3log/solo/service/TagMgmtService.java
+119
-119
core/src/main/java/org/b3log/solo/service/TagQueryService.java
...src/main/java/org/b3log/solo/service/TagQueryService.java
+166
-152
core/src/main/java/org/b3log/solo/service/UserMgmtService.java
...src/main/java/org/b3log/solo/service/UserMgmtService.java
+224
-224
core/src/main/java/org/b3log/solo/service/UserQueryService.java
...rc/main/java/org/b3log/solo/service/UserQueryService.java
+242
-242
core/src/main/java/org/b3log/solo/util/Articles.java
core/src/main/java/org/b3log/solo/util/Articles.java
+324
-303
No files found.
core/src/main/java/org/b3log/solo/processor/ArticleProcessor.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/service/PluginMgmtService.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/service/PluginQueryService.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/service/PreferenceMgmtService.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/service/PreferenceQueryService.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/service/TagMgmtService.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/service/TagQueryService.java
View file @
33aa1635
...
@@ -33,7 +33,7 @@ import org.json.JSONObject;
...
@@ -33,7 +33,7 @@ import org.json.JSONObject;
* Tag query service.
* Tag query service.
*
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.0.
2, Nov 11, 2011
* @version 1.0.0.
3, Jun 28, 2012
* @since 0.4.0
* @since 0.4.0
*/
*/
public
final
class
TagQueryService
{
public
final
class
TagQueryService
{
...
@@ -41,8 +41,7 @@ public final class TagQueryService {
...
@@ -41,8 +41,7 @@ public final class TagQueryService {
/**
/**
* Logger.
* Logger.
*/
*/
private
static
final
Logger
LOGGER
=
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
TagQueryService
.
class
.
getName
());
Logger
.
getLogger
(
TagQueryService
.
class
.
getName
());
/**
/**
* Tag repository.
* Tag repository.
*/
*/
...
@@ -65,8 +64,7 @@ public final class TagQueryService {
...
@@ -65,8 +64,7 @@ public final class TagQueryService {
* </pre>, returns {@code null} if not found
* </pre>, returns {@code null} if not found
* @throws ServiceException service exception
* @throws ServiceException service exception
*/
*/
public
JSONObject
getTagByTitle
(
final
String
tagTitle
)
public
JSONObject
getTagByTitle
(
final
String
tagTitle
)
throws
ServiceException
{
throws
ServiceException
{
try
{
try
{
final
JSONObject
ret
=
new
JSONObject
();
final
JSONObject
ret
=
new
JSONObject
();
...
@@ -87,6 +85,22 @@ public final class TagQueryService {
...
@@ -87,6 +85,22 @@ public final class TagQueryService {
}
}
}
}
/**
* Gets the count of tags.
*
* @return count of tags
* @throws ServiceException service exception
*/
public
long
getTagCount
()
throws
ServiceException
{
try
{
return
tagRepository
.
count
();
}
catch
(
final
RepositoryException
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
"Gets tags failed"
,
e
);
throw
new
ServiceException
(
e
);
}
}
/**
/**
* Gets all tags.
* Gets all tags.
*
*
...
...
core/src/main/java/org/b3log/solo/service/UserMgmtService.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/service/UserQueryService.java
View file @
33aa1635
core/src/main/java/org/b3log/solo/util/Articles.java
View file @
33aa1635
...
@@ -131,6 +131,27 @@ public final class Articles {
...
@@ -131,6 +131,27 @@ public final class Articles {
return
true
;
return
true
;
}
}
/**
* Gets time of the recent updated article.
*
* @return time of the recent updated article, returns {@code 0} if not found
* @throws ServiceException service exception
*/
public
long
getRecentArticleTime
()
throws
ServiceException
{
try
{
final
List
<
JSONObject
>
recentArticles
=
articleRepository
.
getRecentArticles
(
1
);
if
(
recentArticles
.
isEmpty
())
{
return
0
;
}
final
JSONObject
recentArticle
=
recentArticles
.
get
(
0
);
return
((
Date
)
recentArticle
.
get
(
Article
.
ARTICLE_UPDATE_DATE
)).
getTime
();
}
catch
(
final
Exception
e
)
{
LOGGER
.
log
(
Level
.
SEVERE
,
e
.
getMessage
(),
e
);
throw
new
ServiceException
(
"Gets recent article time failed"
);
}
}
/**
/**
* Gets the specified article's author.
* Gets the specified article's author.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment