Source Code Cross Referenced for BatchInputFileSetService.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » kfs » service » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » Kuali Financial System » org.kuali.kfs.service 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2007 The Kuali Foundation.
003:         * 
004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         * http://www.opensource.org/licenses/ecl1.php
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.kuali.kfs.service;
017:
018:        import java.io.File;
019:        import java.io.FileNotFoundException;
020:        import java.io.InputStream;
021:        import java.util.Map;
022:        import java.util.Set;
023:
024:        import org.kuali.core.bo.user.UniversalUser;
025:        import org.kuali.core.exceptions.AuthorizationException;
026:        import org.kuali.kfs.batch.BatchInputFileSetType;
027:        import org.kuali.kfs.exceptions.FileStorageException;
028:
029:        /**
030:         * This interface defines the methods needed to save/download/delete file sets in the batch upload system
031:         */
032:        public interface BatchInputFileSetService {
033:
034:            /**
035:             * Stores the input streams (the values in the Map parameter) as files on the server, identified by the given user file name and
036:             * file user identifier
037:             * 
038:             * @param user - user who is requesting the save
039:             * @param inputType - instance of a BatchInputFileSetType
040:             * @param fileUserIdentifer - file identifier specified by user
041:             * @param typeToStreamMap - contents of the uploaded files, keyed by the input file type
042:             * @return a Map of type to file name mappings of the saved files
043:             * @throws FileStorageException - if errors were encountered while attempting to write the file
044:             */
045:            public Map<String, String> save(UniversalUser user,
046:                    BatchInputFileSetType inputType, String fileUserIdentifer,
047:                    Map<String, InputStream> typeToStreamMap,
048:                    boolean suppressDoneFileCreation)
049:                    throws AuthorizationException, FileStorageException;
050:
051:            /**
052:             * Returns the contents of a batch input file contained on the server if the user has permissions for the files batch input
053:             * type.
054:             * 
055:             * @param user - user who is requesting the download
056:             * @param inputType - instance of a BatchInputFileSetType
057:             * @param fileType - the type of the file to retrieve
058:             * @param fileUserIdentifier file identifier specified by user
059:             * @return File - File representation of the batch input, or null if errors occured. Check GlobalVariables.errorMap for error
060:             *         messages.
061:             * @throws AuthorizationException - if user does not have permission to view batch files of this type FileNotFoundException - if
062:             *         given file does not exist on the file system
063:             */
064:            public File download(UniversalUser user,
065:                    BatchInputFileSetType inputType, String fileType,
066:                    String fileUserIdentifier) throws AuthorizationException,
067:                    FileNotFoundException;
068:
069:            /**
070:             * Deletes a batch input file contained on the server if the user has permissions for the files batch input type. Also deletes
071:             * the associated .done file if one exists. If the file set may not be deleted, then the GlobalVariable's error map will be
072:             * populated with the reason why.
073:             * 
074:             * @param user - user who is requesting the delete
075:             * @param inputType - instance of a BatchInputFileSetType
076:             * @param fileUserIdentifier file identifier specified by user
077:             * @return whether the file was successfully downloaded
078:             * @throws AuthorizationException - if user does not have permission to delete batch files of this type FileNotFoundException -
079:             *         if given file does not exist on the file system
080:             */
081:            public boolean delete(UniversalUser user,
082:                    BatchInputFileSetType inputType, String fileUserIdentifier)
083:                    throws AuthorizationException, FileNotFoundException;
084:
085:            /**
086:             * Checks if the batch input type is active (can be used for upload).
087:             * 
088:             * @param BatchInputFileSetType - input type to check is active
089:             * @return boolean - true if type is active, false if not active
090:             */
091:            public boolean isBatchInputTypeActive(
092:                    BatchInputFileSetType batchInputFileSetType);
093:
094:            /**
095:             * Checks if the user has permissions to manage the batch input type.
096:             * 
097:             * @param batchInputFileSetType - input type to check user permissions on
098:             * @param user - user to check
099:             * @return boolean - true if user has permissions for the type, false if the user does not have permission
100:             */
101:            public boolean isUserAuthorizedForBatchType(
102:                    BatchInputFileSetType batchInputFileSetType,
103:                    UniversalUser user);
104:
105:            /**
106:             * Returns a list of batch type file names (including path) that the given user has permissions to manage.
107:             * 
108:             * @param user - user for checking permissions
109:             * @return List<String> - List of filenames
110:             */
111:            public Set<String> listBatchTypeFileUserIdentifiersForUser(
112:                    BatchInputFileSetType batchInputFileSetType,
113:                    UniversalUser user) throws AuthorizationException;
114:
115:            /**
116:             * Returns whether a file set identifier is properly formatted.
117:             * 
118:             * @param fileUserIdentifier
119:             * @return
120:             */
121:            public boolean isFileUserIdentifierProperlyFormatted(
122:                    String fileUserIdentifier);
123:
124:            /**
125:             * Returns whether a file set for a given user has already been processed
126:             * 
127:             * @param user
128:             * @param inputType
129:             * @param fileUserIdentifier
130:             * @return
131:             */
132:            public boolean hasBeenProcessed(UniversalUser user,
133:                    BatchInputFileSetType inputType, String fileUserIdentifier);
134:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.