Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.6.0 #507

Merged
merged 74 commits into from
Oct 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
42f4634
#434 Add a function that is registration of group members from the e-…
koda-masaru Aug 3, 2016
7dfb04d
Modify version
koda-masaru Aug 6, 2016
ddf361c
#439 Add error handle for search query.
koda-masaru Aug 9, 2016
8e8a66f
Merge pull request #438 from support-project/feature/issue434_shelf_r…
koda-masaru Aug 17, 2016
0988007
Merge pull request #440 from support-project/fix/issue439_serch_error
koda-masaru Aug 17, 2016
641e6b5
Set as the member role in a group of ALL_USER if the data that is NULL
koda-masaru Aug 18, 2016
ab95207
Merge pull request #442 from support-project/fix/issue437_allgroup
koda-masaru Aug 18, 2016
f393c78
Add Slide parser for pdf and pptx
koda-masaru Aug 22, 2016
f3c3d91
#172 Add show slideshow button
koda-masaru Sep 1, 2016
4721a98
#172 Extract images from the attach file.
koda-masaru Sep 1, 2016
ef1fde2
#172 Refactoring to split parts of the edit screen
koda-masaru Sep 3, 2016
2be741b
#172 Get slide information
koda-masaru Sep 4, 2016
be59997
#449 Add link to FontAwesome
koda-masaru Sep 4, 2016
3b3513b
#172 Show slideshow on preview mode.
koda-masaru Sep 5, 2016
67fa360
#172 Split the view page
koda-masaru Sep 6, 2016
a083200
#172 Split the view page script
koda-masaru Sep 6, 2016
607c62a
#172 Show slideshow on view page
koda-masaru Sep 6, 2016
c65a854
Merge pull request #453 from support-project/feature/issue449_link_to…
koda-masaru Sep 6, 2016
307b1eb
Merge pull request #455 from support-project/feature/issue172_slide
koda-masaru Sep 7, 2016
4ae4508
#123 change doc display point
koda-masaru Sep 8, 2016
7dd4ce2
#123 Change the display location of the attachment
koda-masaru Sep 8, 2016
393e065
#443 Change the display size of the bookmark of URL
koda-masaru Sep 8, 2016
c8353a2
#435 Add a information for disclosure range
koda-masaru Sep 8, 2016
54736e1
Merge pull request #456 from support-project/feature/issue123_attachfile
koda-masaru Sep 8, 2016
fcc8e6b
Merge pull request #457 from support-project/feature/issue443_url_size
koda-masaru Sep 8, 2016
477f9a9
Merge pull request #458 from support-project/feature/issue435_informa…
koda-masaru Sep 8, 2016
437cf9f
WebHook JSON add a function sending to Slack
vtjkinoshita Sep 9, 2016
e15f657
#172 slideshow on comment area
koda-masaru Sep 10, 2016
3a6f4bb
#172 change style of slideshow on comment
koda-masaru Sep 10, 2016
9440ae0
#172 fix slideshow preview permission
koda-masaru Sep 10, 2016
0f110cd
Merge pull request #459 from vtjkinoshita/vtj_develop
koda-masaru Sep 10, 2016
66b86ea
Merge pull request #460 from support-project/feature/issue172_slidesh…
koda-masaru Sep 10, 2016
b44ab85
#172 Sort the file list of slide
koda-masaru Sep 12, 2016
6a9b66d
Change preview style on edit page
koda-masaru Sep 12, 2016
bbef39c
Merge pull request #463 from support-project/fix/edit_preview_design
koda-masaru Sep 12, 2016
fa477a4
Merge pull request #464 from support-project/feature/issue172_slide_o…
koda-masaru Sep 12, 2016
f1f4e00
#172 full screen slide show
koda-masaru Sep 12, 2016
e0ded02
#172 change information message
koda-masaru Sep 12, 2016
bcfe75e
#172 update frontend-maven-plugin
koda-masaru Sep 12, 2016
93eb3cd
Merge pull request #465 from support-project/feature/issue172_full_sc…
koda-masaru Sep 12, 2016
d791683
Updated the version and add a license for additional library
koda-masaru Sep 13, 2016
6c9e7e0
#172 Change the library "com-sun-pdfview" to "pdfbox" for pdf to png
koda-masaru Sep 13, 2016
36f6247
Merge pull request #467 from support-project/feature/issue172_pdf_to_…
koda-masaru Sep 13, 2016
8adc093
Merge pull request #466 from support-project/release/v1.6.0.pre1
koda-masaru Sep 13, 2016
a88b8b2
Upgrade pdfbox for use japanese font
koda-masaru Sep 15, 2016
85fdee8
Merge pull request #468 from support-project/feature/upgrade_pdfbox
koda-masaru Sep 15, 2016
68f4760
Items that crawl fails to exempt from the next time
koda-masaru Sep 13, 2016
7af642f
#470 Add default image for parse wait status
koda-masaru Oct 3, 2016
f48bac9
#471 Fix filename of slide image on pptx parser process
koda-masaru Oct 3, 2016
f4bbede
#477 Change a process for create a login cookie
koda-masaru Oct 4, 2016
f65a33e
Merge pull request #474 from support-project/fix/crawl_status
koda-masaru Oct 4, 2016
4f41e54
Merge pull request #475 from support-project/fix/issue470_slide
koda-masaru Oct 4, 2016
6372a09
Merge pull request #476 from support-project/fix/issue471_parse_pptx
koda-masaru Oct 4, 2016
c8d482e
Fix link html test
koda-masaru Oct 4, 2016
9fd8390
Merge pull request #478 from support-project/feature/issue477_login_c…
koda-masaru Oct 4, 2016
fba6896
#469 Add mathjax on edit page
koda-masaru Sep 27, 2016
8190e9a
#469 Add mathjax on view page
koda-masaru Oct 4, 2016
4e2e286
Merge pull request #479 from support-project/feature/issue469_MathJax
koda-masaru Oct 4, 2016
eb26fdc
#436 Refactoring decoration process
koda-masaru Oct 5, 2016
e4526c0
#436 Add create link process
koda-masaru Oct 5, 2016
9be7797
Merge pull request #481 from support-project/feature/issue436_interna…
koda-masaru Oct 5, 2016
93201fb
Updated the version and add a license for additional library
koda-masaru Oct 5, 2016
9e31b18
Merge pull request #482 from support-project/release/v1.6.0.pre2
koda-masaru Oct 5, 2016
44c7a8f
#469 Change the description style of formula
koda-masaru Oct 7, 2016
6cfe4d3
#469 fix unit test for markdown
koda-masaru Oct 7, 2016
5f3048f
Merge pull request #486 from support-project/fix/issue469_math
koda-masaru Oct 7, 2016
7241a7b
Updated the version
koda-masaru Oct 8, 2016
bca42fd
Fix markdown display process
koda-masaru Oct 8, 2016
7b72b51
Merge pull request #487 from support-project/fix/comment
koda-masaru Oct 8, 2016
5230c27
Update version
koda-masaru Oct 14, 2016
cc66b4e
#469 Fix test for a markdown parse result
koda-masaru Oct 14, 2016
085806b
Merge pull request #492 from support-project/fix/test_for_markdown
koda-masaru Oct 14, 2016
6d27054
Release v1.6.0
koda-masaru Oct 31, 2016
543808b
Merge pull request #506 from support-project/release/v1.6.0
koda-masaru Oct 31, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
- License: [Apache License, Version 2.0] http://www.apache.org/licenses/LICENSE-2.0
- project-url: https://hc.apache.org/

- Wrappers PDF View
- License: [Apache License, Version 2.0] http://www.apache.org/licenses/LICENSE-2.0
- project-url: https://mvnrepository.com/artifact/com.kenai.nbpwr/com-sun-pdfview/1.0.5-201003191900




Expand Down Expand Up @@ -160,4 +164,12 @@
- License: [MIT] https://zenorocha.mit-license.org/
- project-url: https://github.com/zenorocha/clipboard.js

- Easy Wizard
- License: [MIT] https://https://opensource.org/licenses/mit-license.php
- project-url: http://st3ph.github.io/jquery.easyWizard/

- MathJax
- License: [Apache License, Version 2.0] https://github.com/mathjax/MathJax/blob/master/LICENSE
- project-url: https://www.mathjax.org/


3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"jquery-oembed-all": "nfl/jquery-oembed-all",
"flag-icon-css": "0.8.5",
"moment": "2.12.0",
"clipboard": "1.5.10"
"clipboard": "1.5.10",
"MathJax": "2.6.1"
},
"devDependencies": {},
"resolutions": {
Expand Down
18 changes: 12 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.support-project</groupId>
<artifactId>knowledge</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
<packaging>war</packaging>

<name>knowledge</name>
Expand Down Expand Up @@ -59,13 +59,13 @@
<dependency>
<groupId>org.support-project</groupId>
<artifactId>web</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
</dependency>

<dependency>
<groupId>org.support-project</groupId>
<artifactId>markedj</artifactId>
<version>1.5.0</version>
<version>1.6.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -123,11 +123,10 @@
<artifactId>lucene-highlighter</artifactId>
<version>4.10.2</version>
</dependency>

<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.9</version>
<version>1.13</version>
<exclusions>
<exclusion>
<groupId>org.ow2.asm</groupId>
Expand Down Expand Up @@ -166,6 +165,13 @@
<version>4.3.1</version>
</dependency>

<dependency>
<groupId>com.kenai.nbpwr</groupId>
<artifactId>com-sun-pdfview</artifactId>
<version>1.0.5-201003191900</version>
<type>nbm</type>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -214,7 +220,7 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.27</version>
<version>1.0</version>
<executions>
<execution>
<id>install node and npm</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.support.project.knowledge.logic.CrawlerLogic;
import org.support.project.knowledge.logic.IndexLogic;
import org.support.project.knowledge.logic.KnowledgeLogic;
import org.support.project.knowledge.logic.SlideLogic;
import org.support.project.knowledge.logic.TargetLogic;
import org.support.project.knowledge.parser.Parser;
import org.support.project.knowledge.parser.ParserFactory;
Expand All @@ -50,6 +51,7 @@ public class FileParseBat extends AbstractBat {
public static final int PARSE_STATUS_PARSING = 1;
public static final int PARSE_STATUS_ERROR_FINISHED = -100;
public static final int PARSE_STATUS_PARSED = 100;
public static final int PARSE_STATUS_SLIDE_PARSED = 101;

public static final int PARSE_STATUS_NO_TARGET = -1;

Expand Down Expand Up @@ -80,6 +82,11 @@ private void start() throws Exception {
crawl();
}


/**
* 情報の種別がBookmarkの場合に、URLに書かれているページのテキストを取得し検索可能にする
* @throws Exception
*/
private void crawl() throws Exception {
KnowledgeItemValuesDao itemValuesDao = KnowledgeItemValuesDao.get();
List<KnowledgeItemValuesEntity> itemValues = itemValuesDao.selectOnTypeIdAndItemNoAndStatus(TemplateMastersDao.TYPE_ID_BOOKMARK,
Expand All @@ -96,6 +103,10 @@ private void crawl() throws Exception {
if (knowledgesEntity == null) {
continue;
}
// パースステータスを処理中に変更
itemValue.setItemStatus(KnowledgeItemValuesEntity.STATUS_DO_PROCESS);
itemValuesDao.update(itemValue);

// タグを取得
List<TagsEntity> tagsEntities = TagsDao.get().selectOnKnowledgeId(knowledgesEntity.getKnowledgeId());
// Webアクセス
Expand Down Expand Up @@ -153,6 +164,13 @@ private void crawl() throws Exception {
}
}

/**
* 添付したファイルの中身を抽出する
* @throws FileNotFoundException
* @throws IOException
* @throws MimeTypeException
* @throws Exception
*/
private void fileParse() throws FileNotFoundException, IOException, MimeTypeException, Exception {
KnowledgeFilesDao filesDao = KnowledgeFilesDao.get();
IndexLogic indexLogic = IndexLogic.get();
Expand Down Expand Up @@ -251,7 +269,11 @@ private void fileParse() throws FileNotFoundException, IOException, MimeTypeExce

// パースステータスをパース完了に変更(もしパースでエラーが発生しても、次回から対象外になる)
filesDao.changeStatus(entity.getFileNo(), PARSE_STATUS_PARSED, UPDATE_USER_ID);

boolean slideParse = SlideLogic.get().parseSlide(tmp, knowledgeFilesEntity);
if (slideParse) {
// スライドのパース済のステータスへ
filesDao.changeStatus(entity.getFileNo(), PARSE_STATUS_SLIDE_PARSED, UPDATE_USER_ID);
}
} catch (Exception e) {
// パースの解析でなんらかのエラー
filesDao.changeStatus(entity.getFileNo(), PARSE_STATUS_ERROR_FINISHED, UPDATE_USER_ID);
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/org/support/project/knowledge/config/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public static AppConfig get() {

private boolean convIndexPath = false;

private String slidePath;

private boolean convSlidePath = false;


/**
* @return the indexPath
*/
Expand All @@ -40,5 +45,30 @@ public String getIndexPath() {
public void setIndexPath(String indexPath) {
this.indexPath = indexPath;
}

/**
* Get slidePath
* @return the slidePath
*/
public String getSlidePath() {
if (StringUtils.isEmpty(slidePath)) {
return "";
}

if (!convSlidePath) {
String path = slidePath;
this.slidePath = convPath(path);
convSlidePath = true;
}
return slidePath;
}

/**
* Set slidePath
* @param slidePath the slidePath to set
*/
public void setSlidePath(String slidePath) {
this.slidePath = slidePath;
}

}
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
package org.support.project.knowledge.control.open;

import java.io.FileNotFoundException;

import org.support.project.common.log.Log;
import org.support.project.common.log.LogFactory;
import org.support.project.di.DI;
import org.support.project.di.Instance;
import org.support.project.knowledge.control.Control;
import org.support.project.knowledge.entity.KnowledgeFilesEntity;
import org.support.project.knowledge.logic.SlideLogic;
import org.support.project.knowledge.logic.UploadedFileLogic;
import org.support.project.knowledge.vo.SlideInfo;
import org.support.project.web.bean.DownloadInfo;
import org.support.project.web.boundary.Boundary;
import org.support.project.web.common.HttpStatus;
import org.support.project.web.control.service.Get;
import org.support.project.web.exception.InvalidParamException;

@DI(instance = Instance.Prototype)
public class FileControl extends Control {
Expand All @@ -24,11 +30,38 @@ public Boundary download() {

Long fileNo = getParam("fileNo", Long.class);
KnowledgeFilesEntity entity = fileLogic.getFile(fileNo, getLoginedUser());

if (entity == null) {
return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND");
}

return download(entity.getFileName(), entity.getFileBinary(), entity.getFileSize().longValue());
}

@Get
public Boundary slide() throws InvalidParamException, FileNotFoundException {
String[] pathInfos = getPathInfos();
if (pathInfos == null || pathInfos.length == 0) {
return send(HttpStatus.SC_400_BAD_REQUEST);
}
String fileNo = pathInfos[0];
String slideImage = null;
if (pathInfos.length > 1) {
slideImage = pathInfos[1];
}
if (slideImage == null) {
// スライドの情報を取得
SlideInfo slideInfo = SlideLogic.get().getSlideInfo(fileNo, getLoginedUser());
if (slideInfo == null) {
return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND");
}
return send(slideInfo);
} else {
// スライドの画像を取得
DownloadInfo down = SlideLogic.get().getSlideImage(fileNo, slideImage, getLoginedUser());
if (down == null) {
return sendError(HttpStatus.SC_404_NOT_FOUND, "Not Found");
}
return download(down);
}
}

}
Loading