Revision: 4081
Author: seba.wagner
Date: Sat Aug 20 11:35:15 2011
Log: Remove unused library
http://code.google.com/p/openmeetings/source/detail?r=4081
Deleted:
/branches/dev/injection/lib/jakarta-commons
/branches/dev/injection/lib/log4j
/branches/dev/injection/lib/mina/bzip2.jar
Modified:
/branches/dev/injection/.classpath
/branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java
=======================================
--- /branches/dev/injection/lib/mina/bzip2.jar Mon Oct 26 13:44:14 2009
+++ /dev/null
Binary file, no diff available.
=======================================
--- /branches/dev/injection/.classpath Sat Aug 20 11:08:18 2011
+++ /branches/dev/injection/.classpath Sat Aug 20 11:35:15 2011
@@ -64,7 +64,6 @@
<classpathentry kind="lib" path="lib/xstream/xpp3_min-1.1.3.4.O.jar"/>
<classpathentry kind="lib" path="lib/xstream/xstream-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/ical4j/ical4j-1.0-SNAPSHOT.jar"/>
- <classpathentry kind="lib" path="lib/java2swf/java2swf.jar"/>
<classpathentry kind="lib" path="lib/jmf/jmf.jar"/>
<classpathentry kind="lib" path="lib/openjpa2/commons-dbcp-1.4.jar"/>
<classpathentry kind="lib" path="lib/openjpa2/commons-lang-2.4.jar"/>
@@ -83,7 +82,6 @@
<classpathentry kind="lib" path="lib/slf4j/slf4j-api-1.5.10.jar"/>
<classpathentry kind="lib" path="lib/upload/commons-digester-1.8.jar"/>
<classpathentry kind="lib"
path="lib/upload/commons-transaction-1.1.jar"/>
- <classpathentry kind="lib" path="lib/upload/iText-5.0.5.jar"/>
<classpathentry kind="lib" path="lib/upload/multipartrequest.jar"/>
<classpathentry kind="lib" path="lib/upload/ws-commons-util-1.0.2.jar"/>
<classpathentry kind="lib" path="lib/upload/xmlrpc-client-3.1.2.jar"/>
@@ -160,5 +158,7 @@
<classpathentry kind="lib" path="lib/axis2-1.6/xml-resolver-1.2.jar"/>
<classpathentry kind="lib" path="lib/axis2-1.6/xmlbeans-2.3.0.jar"/>
<classpathentry kind="lib" path="lib/axis2-1.6/XmlSchema-1.4.7.jar"/>
+ <classpathentry kind="lib" path="lib/java2swf/java2swf.jar"/>
+ <classpathentry kind="lib" path="lib/upload/iText-5.0.5.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java
Sun Aug 14 04:44:55 2011
+++
/branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java
Sat Aug 20 11:35:15 2011
@@ -36,12 +36,13 @@
private static final long serialVersionUID = 8955335681521483484L;
- private static final Logger log =
Red5LoggerFactory.getLogger(UploadHandler.class,
ScopeApplicationAdapter.webAppRootKey);
+ private static final Logger log = Red5LoggerFactory.getLogger(
+ UploadHandler.class,
ScopeApplicationAdapter.webAppRootKey);
private String filesString[] = null;
-
+
private Sessionmanagement sessionManagement;
- private Usermanagement userManagement;
+ private Usermanagement userManagement;
private UsersDaoImpl usersDao;
private ScopeApplicationAdapter scopeApplicationAdapter;
private GenerateImage generateImage;
@@ -51,15 +52,23 @@
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
- sessionManagement =
(Sessionmanagement)config.getServletContext().getAttribute("sessionManagement");
- userManagement =
(Usermanagement)config.getServletContext().getAttribute("userManagement");
- usersDao =
(UsersDaoImpl)config.getServletContext().getAttribute("usersDao");
- scopeApplicationAdapter =
(ScopeApplicationAdapter)config.getServletContext().getAttribute("scopeApplicationAdapter");
- generateImage =
(GenerateImage)config.getServletContext().getAttribute("generateImage");
- generateThumbs =
(GenerateThumbs)config.getServletContext().getAttribute("generateThumbs");
- generatePDF =
(GeneratePDF)config.getServletContext().getAttribute("generatePDF");
- }
-
+ sessionManagement = (Sessionmanagement)
config.getServletContext()
+ .getAttribute("sessionManagement");
+ userManagement = (Usermanagement) config.getServletContext()
+ .getAttribute("userManagement");
+ usersDao = (UsersDaoImpl)
config.getServletContext().getAttribute(
+ "usersDao");
+ scopeApplicationAdapter = (ScopeApplicationAdapter) config
+
.getServletContext().getAttribute("scopeApplicationAdapter");
+ generateImage = (GenerateImage) config.getServletContext()
+ .getAttribute("generateImage");
+ generateThumbs = (GenerateThumbs) config.getServletContext()
+ .getAttribute("generateThumbs");
+ generatePDF = (GeneratePDF)
config.getServletContext().getAttribute(
+ "generatePDF");
+ }
+
+ @Override
protected void service(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws
ServletException,
IOException {
@@ -95,10 +104,10 @@
LinkedHashMap<String, Object> hs = new
LinkedHashMap<String, Object>();
hs.put("user", usersDao.getUser(userId));
-
+
fileService(httpServletRequest, sid, userId, hs);
- scopeApplicationAdapter
- .sendMessageWithClientByPublicSID(hs,
publicSID);
+
scopeApplicationAdapter.sendMessageWithClientByPublicSID(hs,
+ publicSID);
} catch (Exception e) {
System.out.println("Exception during upload: " + e);
e.printStackTrace();
@@ -107,8 +116,8 @@
}
protected void fileService(HttpServletRequest httpServletRequest,
- String sid, Long userId, Map<String, Object> hs) throws
ServletException,
- Exception {
+ String sid, Long userId, Map<String, Object> hs)
+ throws ServletException, Exception {
String room_id = httpServletRequest.getParameter("room_id");
if (room_id == null) {
@@ -131,6 +140,7 @@
InputStream is = upload.getFileContents("Filedata");
// trim whitespace
+ @SuppressWarnings("deprecation")
String fileSystemName = upload.getFileSystemName("Filedata");
fileSystemName = StringUtils.deleteWhitespace(fileSystemName);
@@ -155,20 +165,20 @@
localFolder.mkdirs();
}
- // Check variable to see if this file is a presentation
- int dotidx = fileSystemName.lastIndexOf('.');
- String newFileName =
StringComparer.getInstance().compareForRealPaths(
- fileSystemName.substring(0, dotidx));
- String newFileExtDot = fileSystemName.substring(dotidx,
- fileSystemName.length()).toLowerCase();
- String newFileExt = newFileExtDot.substring(1);
+ // Check variable to see if this file is a presentation
+ int dotidx = fileSystemName.lastIndexOf('.');
+ String newFileName =
StringComparer.getInstance().compareForRealPaths(
+ fileSystemName.substring(0, dotidx));
+ String newFileExtDot = fileSystemName.substring(dotidx,
+ fileSystemName.length()).toLowerCase();
+ String newFileExt = newFileExtDot.substring(1);
// trim long names cause cannot output that
final int MAX_FILE_NAME_LENGTH = 30;
if (newFileName.length() >= MAX_FILE_NAME_LENGTH) {
newFileName = newFileName.substring(0,
MAX_FILE_NAME_LENGTH);
}
- StoredFile storedFile = new StoredFile(newFileName, newFileExt);
+ StoredFile storedFile = new StoredFile(newFileName, newFileExt);
// check if this is a a file that can be converted by
// openoffice-service
@@ -194,7 +204,8 @@
// System.out.println("cannot write to
directory");
}
}
- completeName += ScopeApplicationAdapter.profilesPrefix + userId +
File.separatorChar;
+ completeName += ScopeApplicationAdapter.profilesPrefix
+ userId
+ + File.separatorChar;
File f2 = new File(completeName);
if (!f2.exists()) {
boolean c = f2.mkdir();
@@ -220,8 +231,8 @@
+ "uploadtemp"
+ File.separatorChar
+ ((userProfile) ? "profiles" +
File.separatorChar
- +
ScopeApplicationAdapter.profilesPrefix + userId : roomName)
- + File.separatorChar;
+ +
ScopeApplicationAdapter.profilesPrefix + userId
+ : roomName) +
File.separatorChar;
localFolder = new File(workingDirPpt);
if (!localFolder.exists()) {
localFolder.mkdirs();
@@ -263,8 +274,8 @@
log.debug("canBeConverted: " + canBeConverted);
if (canBeConverted) {
// convert to pdf, thumbs, swf and xml-description
- returnError = generatePDF.convertPDF(currentDir,
- newFileName, newFileExtDot, roomName,
true, completeName);
+ returnError = generatePDF.convertPDF(currentDir,
newFileName,
+ newFileExtDot, roomName, true,
completeName);
} else if (isPdf) {
boolean isEncrypted = false;
try {
@@ -291,6 +302,7 @@
log.debug("isEncrypted :: " + isEncrypted);
+ @SuppressWarnings("unused")
HashMap<String, Object> returnError2 = new HashMap<String,
Object>();
if (isEncrypted) {
@@ -302,8 +314,7 @@
String outputfile = completeName +
newFileExtDot;
- returnError2 = generateThumbs.decodePDF(
- inputfile, outputfile);
+ returnError2 =
generateThumbs.decodePDF(inputfile, outputfile);
File f_old = new File(inputfile);
if (f_old.exists()) {
@@ -313,8 +324,8 @@
}
// convert to thumbs, swf and xml-description
- returnError = generatePDF.convertPDF(currentDir,
- newFileName, newFileExtDot, roomName,
false, completeName);
+ returnError = generatePDF.convertPDF(currentDir,
newFileName,
+ newFileExtDot, roomName, false,
completeName);
// returnError.put("decodePDF", returnError2);
@@ -326,27 +337,27 @@
// User Profile Update
this.deleteUserProfileFiles(currentDir, userId);
// convert it to JPG
- returnError = generateImage
-
.convertImageUserProfile(currentDir, newFileName,
- newFileExtDot,
userId, newFileName, false);
+ returnError =
generateImage.convertImageUserProfile(currentDir,
+ newFileName, newFileExtDot,
userId, newFileName, false);
} else {
// convert it to JPG
log.debug("##### convert it to JPG: " +
userProfile);
- returnError = generateImage.convertImage(
- currentDir, newFileName,
newFileExtDot, roomName,
- newFileName, false);
+ returnError =
generateImage.convertImage(currentDir,
+ newFileName, newFileExtDot,
roomName, newFileName,
+ false);
}
} else if (isAsIs) {
if (userProfile) {
// User Profile Update
this.deleteUserProfileFiles(currentDir, userId);
// is UserProfile Picture
- HashMap<String, Object> processThumb1 =
generateThumbs.generateThumb("_chat_", currentDir,
- completeName,
40);
- HashMap<String, Object> processThumb2 =
generateThumbs.generateThumb("_profile_", currentDir,
- completeName,
126);
- HashMap<String, Object> processThumb3 =
generateThumbs.generateThumb("_big_", currentDir,
- completeName,
240);
+ HashMap<String, Object> processThumb1 =
generateThumbs
+ .generateThumb("_chat_",
currentDir, completeName, 40);
+ HashMap<String, Object> processThumb2 =
generateThumbs
+ .generateThumb("_profile_",
currentDir, completeName,
+ 126);
+ HashMap<String, Object> processThumb3 =
generateThumbs
+ .generateThumb("_big_",
currentDir, completeName, 240);
returnError.put("processThumb1", processThumb1);
returnError.put("processThumb2", processThumb2);
returnError.put("processThumb3", processThumb3);
@@ -358,11 +369,11 @@
us.setPictureuri(pictureuri);
usersDao.updateUser(us);
- scopeApplicationAdapter.updateUserSessionObject(
- userId, pictureuri);
+
scopeApplicationAdapter.updateUserSessionObject(userId,
+ pictureuri);
} else {
- HashMap<String, Object> processThumb =
generateThumbs.generateThumb("_thumb_", currentDir,
- completeName,
50);
+ HashMap<String, Object> processThumb =
generateThumbs
+ .generateThumb("_thumb_",
currentDir, completeName, 50);
returnError.put("processThumb", processThumb);
}
}
@@ -377,7 +388,8 @@
Long users_id) throws Exception {
String working_imgdir = current_dir + "upload" +
File.separatorChar
- + "profiles" + File.separatorChar +
ScopeApplicationAdapter.profilesPrefix + users_id
+ + "profiles" + File.separatorChar
+ + ScopeApplicationAdapter.profilesPrefix +
users_id
+ File.separatorChar;
File f = new File(working_imgdir);
if (f.exists() && f.isDirectory()) {
@@ -389,7 +401,8 @@
throws Exception {
String working_imgdir = current_dir + "upload" +
File.separatorChar
- + "profiles" + File.separatorChar +
ScopeApplicationAdapter.profilesPrefix + users_id
+ + "profiles" + File.separatorChar
+ + ScopeApplicationAdapter.profilesPrefix +
users_id
+ File.separatorChar;
for (int i = 0; i < this.filesString.length; i++) {
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.