=== added file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/RenameMapAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/RenameMapAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/RenameMapAction.java 2012-11-01 17:07:12 +0000
@@ -0,0 +1,59 @@
+package org.hisp.dhis.mapping.action;
+
+import org.hisp.dhis.mapping.Map;
+import org.hisp.dhis.mapping.MappingService;
+import org.hisp.dhis.user.CurrentUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.Action;
+
+public class RenameMapAction
+ implements Action
+{
+ @Autowired
+ private MappingService mappingService;
+
+ @Autowired
+ private CurrentUserService currentUserService;
+
+ private String id;
+
+ public void setId( String id )
+ {
+ this.id = id;
+ }
+
+ private String name;
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ private boolean user;
+
+ public void setUser( boolean user )
+ {
+ this.user = user;
+ }
+
+ public String execute()
+ {
+ Map map = mappingService.getMap( id );
+
+ map.setName( name );
+
+ if ( user )
+ {
+ map.setUser( currentUserService.getCurrentUser() );
+ }
+ else
+ {
+ map.setUser( null );
+ }
+
+ mappingService.updateMap( map );
+
+ return SUCCESS;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml 2012-11-01 16:45:28 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml 2012-11-01 17:07:12 +0000
@@ -168,6 +168,11 @@
+
+
+
+
+
+
+
+ /dhis-web-mapping/void.vm
+
+
- /dhis-web-mapping/void.vm
-
+ /dhis-web-mapping/void.vm