PHOTARK-62 - Adding missing Apache License headers, removing author specific info and minor cleanup around unused package imports

git-svn-id: https://svn.apache.org/repos/asf/incubator/photark/trunk@1070131 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemAlbumImpl.java b/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemAlbumImpl.java
index 3583466..360f2ab 100644
--- a/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemAlbumImpl.java
+++ b/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemAlbumImpl.java
@@ -19,15 +19,6 @@
 
 package org.apache.photark.filesystem.services;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.photark.Image;
-import org.apache.photark.services.album.Album;
-import org.apache.photark.services.album.ImageFilter;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Property;
 
 public class FileSystemAlbumImpl implements org.apache.photark.services.album.Album {
 	private String name;
diff --git a/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemGalleryImpl.java b/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemGalleryImpl.java
index 188fcff..c44c98a 100644
--- a/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemGalleryImpl.java
+++ b/photark-filesystem/src/main/java/org/apache/photark/filesystem/services/FileSystemGalleryImpl.java
@@ -19,14 +19,9 @@
 
 package org.apache.photark.filesystem.services;
 
-import java.io.File;
-import java.net.URL;
-import java.util.logging.Logger;
-
 import org.apache.photark.services.album.Album;
 import org.apache.photark.services.gallery.BaseGalleryImpl;
 import org.apache.photark.services.gallery.Gallery;
-import org.oasisopen.sca.annotation.Init;
 
 public class FileSystemGalleryImpl extends BaseGalleryImpl implements Gallery {
     private static final java.util.logging.Logger logger =
@@ -84,7 +79,7 @@
     }
 
     public boolean hasAlbum(String albumName) {
-        return false; 
+        return false;
     }
 
     public void deleteAlbum(String albumName) {
@@ -92,6 +87,6 @@
 	}
 
     public Album[] getAlbumsToSetPermission(String securityToken) {
-        return new Album[0]; 
+        return new Album[0];
     }
 }
\ No newline at end of file
diff --git a/photark-flickr/src/test/java/org/apache/photark/album/flickr/FlickrSubscriptionTestCase.java b/photark-flickr/src/test/java/org/apache/photark/album/flickr/FlickrSubscriptionTestCase.java
index 9485f02..bb18ee2 100644
--- a/photark-flickr/src/test/java/org/apache/photark/album/flickr/FlickrSubscriptionTestCase.java
+++ b/photark-flickr/src/test/java/org/apache/photark/album/flickr/FlickrSubscriptionTestCase.java
@@ -23,7 +23,7 @@
 import org.apache.tuscany.sca.data.collection.Entry;
 import org.junit.BeforeClass;
 import org.junit.Test;
- // <user password="aaa" roles="photark-admin" username="aaa"/>
+
 public class FlickrSubscriptionTestCase {
     private static final String SUBSCRIPTION_URL = "http://api.flickr.com/services/feeds/photos_public.gne?id=24662369@N07&lang=en-us&format=atom";
     private static FlickrPhotoStream photoStream;
diff --git a/photark-jcr/src/main/java/org/apache/photark/jcr/album/subscription/AlbumSubscriptionManager.java b/photark-jcr/src/main/java/org/apache/photark/jcr/album/subscription/AlbumSubscriptionManager.java
index fb962a6..bee19db 100644
--- a/photark-jcr/src/main/java/org/apache/photark/jcr/album/subscription/AlbumSubscriptionManager.java
+++ b/photark-jcr/src/main/java/org/apache/photark/jcr/album/subscription/AlbumSubscriptionManager.java
@@ -1,30 +1,37 @@
+/*
+ * 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.photark.jcr.album.subscription;
 
+import java.util.logging.Logger;
+
 import org.apache.photark.Image;
 import org.apache.photark.album.flickr.FlickrPhotoStream;
 import org.apache.photark.album.picasa.PicasaPhotoStream;
 import org.apache.photark.jcr.JCRRepositoryManager;
 import org.apache.photark.jcr.services.JCRAlbumImpl;
-import org.apache.photark.jcr.services.JCRGalleryImpl;
 import org.apache.photark.services.gallery.RemoteAlbumSubscription;
 import org.apache.photark.services.gallery.RemoteGallery;
 import org.apache.tuscany.sca.data.collection.Entry;
 import org.oasisopen.sca.annotation.Reference;
 import org.oasisopen.sca.annotation.Remotable;
 import org.oasisopen.sca.annotation.Scope;
-import org.oasisopen.sca.annotation.Service;
-import org.apache.tuscany.sca.data.collection.Entry;
 
-
-import java.util.logging.Logger;
-
-/**
- * Created by IntelliJ IDEA.
- * User: subash
- * Date: Jan 31, 2011
- * Time: 2:11:15 PM
- * To change this template use File | Settings | File Templates.
- */
 @Remotable
 @Scope("COMPOSITE")
 public class AlbumSubscriptionManager implements RemoteAlbumSubscription {
diff --git a/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRAlbumAggregator.java b/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRAlbumAggregator.java
index 365b034..4d8c028 100644
--- a/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRAlbumAggregator.java
+++ b/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRAlbumAggregator.java
@@ -1,18 +1,38 @@
+/*
+ * 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.photark.jcr.services;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.logging.Logger;
 
-import org.apache.photark.jcr.JCRRepositoryManager;
-import org.apache.photark.Image;
-import org.apache.photark.services.album.Album;
-import org.apache.photark.services.album.AlbumAgregator;
-
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import org.apache.photark.jcr.JCRRepositoryManager;
+import org.apache.photark.services.album.Album;
+import org.apache.photark.services.album.AlbumAgregator;
+
 public class JCRAlbumAggregator extends AlbumAgregator {
 
     private JCRRepositoryManager repositoryManager;
diff --git a/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRImageUploadServiceImpl.java b/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRImageUploadServiceImpl.java
index 4445f01..62eaaf3 100644
--- a/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRImageUploadServiceImpl.java
+++ b/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRImageUploadServiceImpl.java
@@ -19,11 +19,20 @@
 
 package org.apache.photark.jcr.services;
 
+import static org.apache.photark.security.utils.Constants.ACCESS_LIST;
+import static org.apache.photark.security.utils.Constants.ALBUM_ADD_IMAGES_PERMISSION;
+import static org.apache.photark.security.utils.Constants.ALBUM_CREATE_PERMISSION;
+import static org.apache.photark.security.utils.Constants.ALBUM_DELETE_IMAGES_PERMISSION;
+import static org.apache.photark.security.utils.Constants.ALBUM_EDIT_ALBUM_DESCRIPTION_PERMISSION;
+
 import java.io.BufferedInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintWriter;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -44,14 +53,12 @@
 import org.apache.photark.jcr.util.ArchiveFileExtractor;
 import org.apache.photark.security.authorization.AccessList;
 import org.apache.photark.security.authorization.services.AccessManager;
-import org.apache.photark.security.authorization.services.SecurityServiceImpl;
 import org.apache.photark.services.album.Album;
 import org.apache.photark.services.gallery.Gallery;
 import org.oasisopen.sca.annotation.Init;
 import org.oasisopen.sca.annotation.Reference;
 import org.oasisopen.sca.annotation.Scope;
 import org.oasisopen.sca.annotation.Service;
-import static org.apache.photark.security.utils.Constants.*;
 
 /**
  * Servlet responsible for receiving image uploads
diff --git a/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRRemoteGalleryImpl.java b/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRRemoteGalleryImpl.java
index 1041a66..5ae273a 100644
--- a/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRRemoteGalleryImpl.java
+++ b/photark-jcr/src/main/java/org/apache/photark/jcr/services/JCRRemoteGalleryImpl.java
@@ -1,37 +1,47 @@
+/*
+ * 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.photark.jcr.services;
 
-import org.apache.photark.services.gallery.GalleryListener;
-import org.apache.photark.services.gallery.RemoteGallery;
+import static org.apache.photark.security.utils.Constants.ALBUM_VIEW_IMAGES_PERMISSION;
+import static org.apache.photark.security.utils.Constants.GUEST;
 
-import java.io.File;
-import java.net.URL;
 import java.util.ArrayList;
-import java.util.GregorianCalendar;
-import java.util.Iterator;
 import java.util.List;
 import java.util.logging.Logger;
 
-import javax.jcr.*;
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 
 import org.apache.photark.Image;
 import org.apache.photark.jcr.JCRRepositoryManager;
 import org.apache.photark.security.authorization.services.AccessManager;
 import org.apache.photark.services.album.Album;
-import org.apache.photark.services.gallery.BaseGalleryImpl;
-import org.apache.photark.services.gallery.Gallery;
-import org.oasisopen.sca.annotation.*;
+import org.apache.photark.services.gallery.GalleryListener;
+import org.apache.photark.services.gallery.RemoteGallery;
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Init;
 import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
 
-import static org.apache.photark.security.utils.Constants.*;
-
-
-/**
- * Created by IntelliJ IDEA.
- * User: subash
- * Date: Jan 27, 2011
- * Time: 4:43:03 PM
- * To change this template use File | Settings | File Templates.
- */
 @Scope("COMPOSITE")
 public class JCRRemoteGalleryImpl implements RemoteGallery {
 
diff --git a/photark-picasa/src/main/java/org/apache/photark/album/picasa/PicasaPhotoStream.java b/photark-picasa/src/main/java/org/apache/photark/album/picasa/PicasaPhotoStream.java
index e30f96a..b81181c 100644
--- a/photark-picasa/src/main/java/org/apache/photark/album/picasa/PicasaPhotoStream.java
+++ b/photark-picasa/src/main/java/org/apache/photark/album/picasa/PicasaPhotoStream.java
@@ -23,7 +23,6 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -34,7 +33,6 @@
 import org.apache.tuscany.sca.data.collection.NotFoundException;
 
 import com.google.gdata.client.photos.PicasawebService;
-import com.google.gdata.data.Feed;
 import com.google.gdata.data.photos.AlbumFeed;
 import com.google.gdata.data.photos.PhotoEntry;
 import com.google.gdata.util.AuthenticationException;
diff --git a/photark-ui/src/main/webapp/js/constants.js b/photark-ui/src/main/webapp/js/constants.js
index f303f0f..1d74145 100644
--- a/photark-ui/src/main/webapp/js/constants.js
+++ b/photark-ui/src/main/webapp/js/constants.js
@@ -28,9 +28,7 @@
 photark.constants.contextRoot = "/photark/";
 photark.constants.adminContextRoot = "/photark/admin/";
 
-//photark.constants.FlickerAlbumSubscription = photark.constants.contextRoot + "FlickerAlbumSubscription?smd";
 photark.constants.RemoteAlbumSubscription = photark.constants.contextRoot + "RemoteAlbumSubscriptionManager?smd";
-//photark.constants.PicasaAlbumSubscription = photark.constants.contextRoot + "PicasaAlbumSubscription?smd";
 photark.constants.GalleryServiceEndpoint = photark.constants.contextRoot + "GalleryService?smd";
 photark.constants.RemoteGalleryServiceEndpoint = photark.constants.contextRoot + "JCRRemoteGallery?smd";
 photark.constants.SearchServiceEndpoint = photark.constants.contextRoot + "SearchService?smd";
diff --git a/photark/src/main/java/org/apache/photark/services/gallery/RemoteAlbumSubscription.java b/photark/src/main/java/org/apache/photark/services/gallery/RemoteAlbumSubscription.java
index 94d0f17..c6fa1b1 100644
--- a/photark/src/main/java/org/apache/photark/services/gallery/RemoteAlbumSubscription.java
+++ b/photark/src/main/java/org/apache/photark/services/gallery/RemoteAlbumSubscription.java
@@ -1,25 +1,27 @@
+/*
+ * 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.photark.services.gallery;
 
-/**
- * Created by IntelliJ IDEA.
- * User: subash
- * Date: Jan 27, 2011
- * Time: 9:27:59 AM
- * To change this template use File | Settings | File Templates.
- */
 import org.apache.photark.Image;
 import org.apache.tuscany.sca.data.collection.Entry;
 import org.oasisopen.sca.annotation.Remotable;
 
-import java.util.Set;
-
-/**
- * Created by IntelliJ IDEA.
- * User: siddhi
- * Date: Oct 6, 2010
- * Time: 3:26:24 PM
- * To change this template use File | Settings | File Templates.
- */
 @Remotable
 public interface RemoteAlbumSubscription {
 
diff --git a/photark/src/main/java/org/apache/photark/services/gallery/RemoteGallery.java b/photark/src/main/java/org/apache/photark/services/gallery/RemoteGallery.java
index df89713..a45cc9b 100644
--- a/photark/src/main/java/org/apache/photark/services/gallery/RemoteGallery.java
+++ b/photark/src/main/java/org/apache/photark/services/gallery/RemoteGallery.java
@@ -1,16 +1,27 @@
+/*
+ * 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.photark.services.gallery;
 
 import org.apache.photark.Image;
 import org.apache.photark.services.album.Album;
 import org.oasisopen.sca.annotation.Remotable;
 
-/**
- * Created by IntelliJ IDEA.
- * User: subash
- * Date: Jan 27, 2011
- * Time: 4:43:26 PM
- * To change this template use File | Settings | File Templates.
- */
 @Remotable
 public interface RemoteGallery {