struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [01/14] struts git commit: Introduces a dedicated class to represent an uploaded file
Date Fri, 25 Nov 2016 18:17:56 GMT
Repository: struts
Updated Branches:
  refs/heads/master 6d623ebb5 -> 32341681e


Introduces a dedicated class to represent an uploaded file


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/fe05ca20
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/fe05ca20
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/fe05ca20

Branch: refs/heads/master
Commit: fe05ca20951ecda86e147dbf5272709412df820d
Parents: 6f7fcaa
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Mon Nov 21 11:04:24 2016 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Mon Nov 21 11:04:24 2016 +0100

----------------------------------------------------------------------
 .../dispatcher/multipart/UploadedFile.java      | 39 ++++++++++++++++++++
 1 file changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/fe05ca20/core/src/main/java/org/apache/struts2/dispatcher/multipart/UploadedFile.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/multipart/UploadedFile.java
b/core/src/main/java/org/apache/struts2/dispatcher/multipart/UploadedFile.java
new file mode 100644
index 0000000..e6a77a8
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/dispatcher/multipart/UploadedFile.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.struts2.dispatcher.multipart;
+
+/**
+ * Virtual representation of a uploaded file used by {@link MultiPartRequest}
+ */
+public interface UploadedFile<T> {
+
+    Long length();
+
+    String getName();
+
+    boolean isFile();
+
+    boolean delete();
+
+    String getAbsolutePath();
+
+    T getContent();
+
+}


Mime
View raw message