dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04046
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1340: Function Excel-File Management
------------------------------------------------------------
revno: 1340
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-01-26 14:04:17 +0700
message:
Function Excel-File Management
added:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ExcelTemplateListAction.java
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== added directory 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager'
=== added directory 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action'
=== added file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ExcelTemplateListAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ExcelTemplateListAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ExcelTemplateListAction.java 2010-01-26 07:04:17 +0000
@@ -0,0 +1,57 @@
+package org.hisp.dhis.reportexcel.filemanager.action;
+
+import java.io.File;
+import java.util.Collection;
+
+import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.reportexcel.utils.FileUtils;
+
+import com.opensymphony.xwork2.Action;
+
+public class ExcelTemplateListAction
+ implements Action
+{
+ // -------------------------------------------
+ // Dependency
+ // -------------------------------------------
+
+ private SystemSettingManager systemSettingManager;
+
+ // -------------------------------------------
+ // Output
+ // -------------------------------------------
+ private Collection<File> templateFiles;
+
+ // -------------------------------------------
+ // Getter
+ // -------------------------------------------
+
+ public Collection<File> getTemplateFiles()
+ {
+ return templateFiles;
+ }
+
+ public void setSystemSettingManager( SystemSettingManager systemSettingManager )
+ {
+ this.systemSettingManager = systemSettingManager;
+ }
+
+ // -------------------------------------------
+ // Action implementation
+ // -------------------------------------------
+
+ @Override
+ public String execute()
+ throws Exception
+ {
+ String templateDirectory = (String) systemSettingManager
+ .getSystemSetting( SystemSettingManager.KEY_REPORT_TEMPLATE_DIRECTORY );
+
+ File reportTempDir = new File( templateDirectory );
+
+ templateFiles = FileUtils.getListFile( reportTempDir );
+
+ return SUCCESS;
+ }
+
+}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.java 2009-12-21 11:09:00 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.java 2010-01-26 07:04:17 +0000
@@ -124,7 +124,7 @@
public void initFont( Font test_font, String fontName, short fontHeightInPoints, short boldWeight, short fontColor )
{
- test_font.setFontName( fontName );
+ test_font.setFontName( fontName );
test_font.setFontHeightInPoints( fontHeightInPoints );
test_font.setBoldweight( boldWeight );
test_font.setColor( fontColor );