[kune-commits] r1372 - in trunk: . script src/main/java/cc/kune src/main/java/cc/kune/barters/server src/main/java/cc/kune/client src/main/java/cc/kune/core/client/actions src/main/java/cc/kune/core/client/resources/nav src/main/java/cc/kune/core/server src/main/java/cc/kune/domain src/main/java/cc/kune/gspace/client/viewers src/main/java/cc/kune/meets src/main/java/cc/kune/meets/client src/main/java/cc/kune/meets/client/actions src/main/java/cc/kune/meets/server src/main/java/cc/kune/meets/shared src/main/java/cc/kune/wave/client
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Tue May 10 23:49:42 CEST 2011
Author: vjrj_
Date: 2011-05-10 23:49:41 +0200 (Tue, 10 May 2011)
New Revision: 1372
Added:
trunk/Blogs
trunk/blogs
trunk/script/cloneTool.sh
trunk/src/main/java/cc/kune/core/client/resources/nav/calendar.png
trunk/src/main/java/cc/kune/core/client/resources/nav/calendar_add.png
trunk/src/main/java/cc/kune/meets/
trunk/src/main/java/cc/kune/meets/KuneMeets.gwt.xml
trunk/src/main/java/cc/kune/meets/client/
trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java
trunk/src/main/java/cc/kune/meets/client/MeetingsGinModule.java
trunk/src/main/java/cc/kune/meets/client/MeetingsGinjector.java
trunk/src/main/java/cc/kune/meets/client/MeetingsParts.java
trunk/src/main/java/cc/kune/meets/client/actions/
trunk/src/main/java/cc/kune/meets/client/actions/DelMeetingsMenuItem.java
trunk/src/main/java/cc/kune/meets/client/actions/GoParentFolderBtn.java
trunk/src/main/java/cc/kune/meets/client/actions/MeetingsClientActions.java
trunk/src/main/java/cc/kune/meets/client/actions/NewMeetingsBtn.java
trunk/src/main/java/cc/kune/meets/client/actions/OpenMeetingsMenuItem.java
trunk/src/main/java/cc/kune/meets/server/
trunk/src/main/java/cc/kune/meets/server/MeetingServerModule.java
trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java
trunk/src/main/java/cc/kune/meets/shared/
trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java
Modified:
trunk/src/main/java/cc/kune/Kune.gwt.xml
trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/core/client/actions/RolActionAutoUpdated.java
trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
trunk/src/main/java/cc/kune/domain/Content.java
trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.ui.xml
trunk/src/main/java/cc/kune/wave/client/WebClient.java
Log:
meetings tool
Added: trunk/Blogs
===================================================================
Added: trunk/blogs
===================================================================
Added: trunk/script/cloneTool.sh
===================================================================
--- trunk/script/cloneTool.sh (rev 0)
+++ trunk/script/cloneTool.sh 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+usage() {
+ echo "Use: $0 -o oldtoolname -n newtoolname"
+ echo "$0 -o docs -O Documents -n blogs -N Blogs "
+}
+
+while getopts “ho:n:O:N:” OPTION
+do
+ case $OPTION in
+ h)
+ usage
+ exit 1
+ ;;
+ o)
+ OLDS=$OPTARG
+ ;;
+ n)
+ NEWS=$OPTARG
+ ;;
+ O)
+ OLDCS=$OPTARG
+ ;;
+ N)
+ NEWCS=$OPTARG
+ ;;
+ ?)
+ usage
+ exit
+ ;;
+ esac
+done
+
+if [[ -z $OLDS ]] || [[ -z $NEWS ]] || [[ -z $OLDCS ]] || [[ -z $NEWCS ]]
+then
+ usage
+ exit 1
+fi
+
+OLD=$(echo ${OLDS%\s})
+NEW=$(echo ${NEWS%\s})
+OLDC=$(echo ${OLDCS%\s})
+NEWC=$(echo ${NEWCS%\s})
+OLD1S=`echo "${OLDS:0:1}" | tr a-z A-Z`${OLDS:1}
+NEW1S=`echo "${NEWS:0:1}" | tr a-z A-Z`${NEWS:1}
+OLD1=$(echo ${OLD1S%\s})
+NEW1=$(echo ${NEW1S%\s})
+OLDNCS=`echo "${OLDCS:0:1}" | tr A-Z a-z`${OLDCS:1}
+NEWNCS=`echo "${NEWCS:0:1}" | tr A-Z a-z`${NEWCS:1}
+OLDCC=`echo $OLDC | tr a-z A-Z`
+NEWCC=`echo $NEWC | tr a-z A-Z`
+
+echo We\'ll clone and rename:
+echo " " $OLDCS to $NEWCS
+echo " &" $OLDNCS to $NEWNCS
+echo " &" $OLDC to $NEWC
+echo " &" $OLD1S to $NEW1S
+echo " &" $OLDS to $NEWS
+echo " &" $OLD1 to $NEW1
+echo " &" $OLD to $NEW
+echo " &" $OLDCC to $NEWCC
+
+read -p "Are you sure? (Ctrl-C to cancel) "
+
+cd src/main/java/cc/kune/
+rsync -r -C $OLDS/ $NEWS
+cd $NEWS/
+
+find . -name '*.java' | xargs rename 's/$OLDCS/$NEWCS/g'
+find . -name '*.java' | xargs rename 's/$OLDC/$NEWC/g'
+find . -name '*.java' | xargs rename 's/$OLD1S/$NEW1S/g'
+find . -name '*.java' | xargs rename 's/$OLDS/$NEWS/g'
+find . -name '*.java' | xargs rename 's/$OLD1/$NEW1/g'
+find . -name '*.java' | xargs rename 's/$OLD/$NEW/g'
+find . -name '*.xml' | xargs rename 's/$OLD1S/$NEW1S/g'
+find . -name '*.xml' | xargs rename 's/$OLDS/$NEWS/g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLDCS/$NEWCS/g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLDC/$NEWC/g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLD1S/$NEW1S/g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLDS/$NEWS/g'
+find . -name '*.java' | xargs perl -p -i -e 's/\.$OLDS\./\.$NEWS\./g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLD1/$NEW1/g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLDNCS/$NEWNCS/g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLD/$NEW/g'
+find . -name '*.java' | xargs perl -p -i -e 's/$OLDCC/$NEWCC/g'
+
Property changes on: trunk/script/cloneTool.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/src/main/java/cc/kune/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-05-10 21:49:41 UTC (rev 1372)
@@ -10,6 +10,7 @@
<inherits name="cc.kune.chat.KuneChat" />
<inherits name="cc.kune.docs.KuneDocs" />
<inherits name="cc.kune.wiki.KuneWiki" />
+ <inherits name="cc.kune.meets.KuneMeets" />
<inherits name="cc.kune.pspace.PSpace" />
<inherits name="com.calclab.suco.Suco" />
<inherits name="org.adamtacy.GWTEffects"></inherits>
Modified: trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -28,12 +28,8 @@
import java.net.URL;
import java.util.Date;
-import org.waveprotocol.wave.model.waveref.InvalidWaveRefException;
-import org.waveprotocol.wave.util.escapers.jvm.JavaWaverefEncoder;
-
import cc.kune.core.client.errors.ContainerNotPermittedException;
import cc.kune.core.client.errors.ContentNotPermittedException;
-import cc.kune.core.client.errors.DefaultException;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
@@ -50,7 +46,6 @@
import cc.kune.domain.Group;
import cc.kune.domain.ToolConfiguration;
import cc.kune.domain.User;
-import cc.kune.wave.server.KuneWaveManager;
import com.google.inject.Inject;
@@ -62,29 +57,18 @@
private final ContentManager contentManager;
private final URL gadgetUrl;
private final I18nTranslationService i18n;
- private final KuneWaveManager waveManager;
@Inject
public BarterServerTool(final ContentManager contentManager, final ContainerManager containerManager,
final ToolConfigurationManager configurationManager,
- final I18nTranslationService translationService, final KuneWaveManager waveManager) {
+ final I18nTranslationService translationService) {
this.contentManager = contentManager;
this.containerManager = containerManager;
this.configurationManager = configurationManager;
this.i18n = translationService;
- this.waveManager = waveManager;
gadgetUrl = UrlUtils.of(BARTER_GADGET);
}
- private void addGadget(final Content content) {
- try {
- waveManager.addGadget(JavaWaverefEncoder.decodeWaveRefFromPath(content.getWaveId()),
- content.getAuthors().get(0).getShortName(), BARTER_GADGET);
- } catch (final InvalidWaveRefException e) {
- throw new DefaultException("Error creating barter");
- }
- }
-
void checkContainerTypeId(final String parentTypeId, final String typeId) {
if (typeId.equals(TYPE_FOLDER)) {
// ok valid container
Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -78,8 +78,9 @@
ginjector.getGroupMembersPresenter();
ginjector.getDocsParts();
ginjector.getBlogsParts();
+ ginjector.getMeetingsParts();
+ ginjector.getBartersParts();
ginjector.getWikiParts();
- ginjector.getBartersParts();
ginjector.getSiteLogoPresenter();
ginjector.getSpacesTabPresenter();
ginjector.getChatClient();
Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -56,6 +56,8 @@
import cc.kune.docs.client.DocsGinjector;
import cc.kune.gspace.client.GSpaceGinModule;
import cc.kune.gspace.client.GSpaceGinjector;
+import cc.kune.meets.client.MeetingsGinModule;
+import cc.kune.meets.client.MeetingsGinjector;
import cc.kune.pspace.client.PSpaceGinModule;
import cc.kune.pspace.client.PSpaceParts;
import cc.kune.pspace.client.PSpacePresenter;
@@ -73,9 +75,9 @@
@GinModules({ KuneGinModule.class, CoreGinModule.class, ChatGinModule.class, WaveGinModule.class,
PSpaceGinModule.class, GSpaceGinModule.class, DocsGinModule.class, BlogsGinModule.class,
- WikiGinModule.class, BartersGinModule.class })
+ WikiGinModule.class, BartersGinModule.class, MeetingsGinModule.class })
public interface KuneGinjector extends Ginjector, GSpaceGinjector, DocsGinjector, BlogsGinjector,
- WikiGinjector, BartersGinjector {
+ WikiGinjector, BartersGinjector, MeetingsGinjector {
/*
* You have to add here all the GWTPresenters (as Provider or AsyncProvider)
Modified: trunk/src/main/java/cc/kune/core/client/actions/RolActionAutoUpdated.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/RolActionAutoUpdated.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/core/client/actions/RolActionAutoUpdated.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -39,44 +39,47 @@
*
*/
public abstract class RolActionAutoUpdated extends AbstractExtendedAction {
- protected final Session session;
- protected final StateManager stateManager;
+ protected final Session session;
+ protected final StateManager stateManager;
- @Inject
- public RolActionAutoUpdated(final StateManager stateManager, final Session session,
- final AccessRightsClientManager rightsManager, final AccessRolDTO rolRequired, final boolean authNeed,
- final boolean visibleForNonMemb, final boolean visibleForMembers) {
- this.stateManager = stateManager;
- this.session = session;
- rightsManager.onRightsChanged(true, new AccessRightsChangedHandler() {
- @Override
- public void onAccessRightsChanged(final AccessRightsChangedEvent event) {
- refreshStatus(rolRequired, authNeed, session.isLogged(), visibleForMembers, visibleForNonMemb,
- event.getCurrentRights());
+ @Inject
+ public RolActionAutoUpdated(final StateManager stateManager, final Session session,
+ final AccessRightsClientManager rightsManager, final AccessRolDTO rolRequired,
+ final boolean authNeed, final boolean visibleForNonMemb, final boolean visibleForMembers) {
+ this.stateManager = stateManager;
+ this.session = session;
+ rightsManager.onRightsChanged(true, new AccessRightsChangedHandler() {
+ @Override
+ public void onAccessRightsChanged(final AccessRightsChangedEvent event) {
+ refreshStatus(rolRequired, authNeed, session.isLogged(), visibleForMembers, visibleForNonMemb,
+ event.getCurrentRights());
- }
- });
- }
+ }
+ });
+ }
- public void refreshStatus(final AccessRolDTO rolRequired, final boolean authNeed, final boolean isLogged,
- final boolean visibleForMembers, final boolean visibleForNonMemb, final AccessRights newRights) {
- boolean newVisibility = false;
- boolean newEnabled = false;
- if (authNeed && !isLogged) {
- newVisibility = newEnabled = false;
- } else {
- // Auth ok
- newEnabled = RolComparator.isEnabled(rolRequired, newRights);
- if (newEnabled) {
- final boolean isMember = RolComparator.isMember(newRights);
- newEnabled = newVisibility = isMember && visibleForMembers || !isMember && visibleForNonMemb;
- } else {
- newVisibility = false;
- }
- }
- setEnabled(newEnabled);
- putValue(GuiActionDescrip.VISIBLE, newVisibility);
- // NotifyUser.info("Set '" + getValue(Action.NAME) + "' visible: " +
- // newVisibility, true);
+ public void refreshStatus(final AccessRolDTO rolRequired, final boolean authNeed,
+ final boolean isLogged, final boolean visibleForMembers, final boolean visibleForNonMemb,
+ final AccessRights newRights) {
+ boolean newVisibility = false;
+ boolean newEnabled = false;
+ if (authNeed && !isLogged) {
+ newVisibility = newEnabled = false;
+ } else {
+ // Auth ok
+ newEnabled = RolComparator.isEnabled(rolRequired, newRights);
+ if (newEnabled) {
+ final boolean isMember = RolComparator.isMember(newRights);
+ newEnabled = newVisibility = isMember && visibleForMembers || !isMember && visibleForNonMemb;
+ } else {
+ newVisibility = false;
+ }
}
+ setEnabled(newEnabled);
+ // Workaround to force change ...
+ putValue(GuiActionDescrip.VISIBLE, !newVisibility);
+ putValue(GuiActionDescrip.VISIBLE, newVisibility);
+ // NotifyUser.info("Set '" + getValue(Action.NAME) + "' visible: " +
+ // newVisibility, true);
+ }
}
Modified: trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -36,6 +36,12 @@
@Source("blog_add.png")
ImageResource blogAdd();
+ @Source("calendar.png")
+ ImageResource calendar();
+
+ @Source("calendar_add.png")
+ ImageResource calendarAdd();
+
@Source("download.png")
ImageResource download();
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/calendar.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/calendar.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/calendar_add.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/calendar_add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -50,6 +50,7 @@
import cc.kune.core.server.rest.TestJSONService;
import cc.kune.core.server.rest.UserJSONService;
import cc.kune.docs.server.DocumentServerModule;
+import cc.kune.meets.server.MeetingServerModule;
import cc.kune.wiki.server.WikiServerModule;
import com.google.inject.AbstractModule;
@@ -144,8 +145,9 @@
builder.use(new PlatformServerModule());
builder.use(new DocumentServerModule());
builder.use(new BlogServerModule());
+ builder.use(new BarterServerModule());
+ builder.use(new MeetingServerModule());
builder.use(new WikiServerModule());
- builder.use(new BarterServerModule());
// builder.use(new ChatServerModule());
// builder.use(new GalleryServerModule());
builder.use(new RESTServicesModule());
Modified: trunk/src/main/java/cc/kune/domain/Content.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/Content.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/domain/Content.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -58,6 +58,7 @@
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.docs.shared.DocsConstants;
import cc.kune.domain.utils.HasStateToken;
+import cc.kune.meets.shared.MeetingsConstants;
import cc.kune.wiki.shared.WikiConstants;
@Entity
@@ -261,8 +262,9 @@
@Transient
public boolean isWave() {
- return (typeId.equals(DocsConstants.TYPE_DOCUMENT)) || typeId.equals(WikiConstants.TYPE_WIKIPAGE)
- || (typeId.equals(BlogsConstants.TYPE_POST) || typeId.equals(BartersConstants.TYPE_BARTER));
+ return (typeId.equals(DocsConstants.TYPE_DOCUMENT))
+ || typeId.equals(WikiConstants.TYPE_WIKIPAGE)
+ || (typeId.equals(BlogsConstants.TYPE_POST) || typeId.equals(BartersConstants.TYPE_BARTER) || typeId.equals(MeetingsConstants.TYPE_MEETING));
}
public void removeAuthor(final User user) {
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.ui.xml 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.ui.xml 2011-05-10 21:49:41 UTC (rev 1372)
@@ -15,15 +15,24 @@
right: 0;
}
+ .onlyparent {
+ padding: 10px;
+ width: auto;
+ height: auto;
+ }
+
.viewonly {
- margin: 5px;
+
}
</ui:style>
- <g:HTMLPanel width="100%" height="100%">
+ <g:HTMLPanel>
<g:DeckPanel ui:field="deck" addStyleNames="k-doc-content-deck">
- <!-- <w:ImplPanel ui:field="waveHolder" addStyleNames="{style.waveHolder}" /> -->
- <g:VerticalPanel ui:field="waveHolderParent" />
- <g:InlineHTML ui:field="onlyViewPanel" styleName="{style.viewonly}" />
+ <!-- <w:ImplPanel ui:field="waveHolder" addStyleNames="{style.waveHolder}"
+ /> -->
+ <g:VerticalPanel ui:field="waveHolderParent" />
+ <g:FlowPanel ui:field="onlyViewParent" height="auto" width="auto" addStyleNames="{style.onlyparent}">
+ <g:InlineHTML ui:field="onlyViewPanel" styleName="{style.viewonly}" />
+ </g:FlowPanel>
</g:DeckPanel>
</g:HTMLPanel>
</ui:UiBinder>
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/meets/KuneMeets.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/meets/KuneMeets.gwt.xml (rev 0)
+++ trunk/src/main/java/cc/kune/meets/KuneMeets.gwt.xml 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,6 @@
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.1.0/distro-source/core/src/gwt-module.dtd">
+<module>
+ <inherits name="cc.kune.core.KuneCore" />
+ <source path="client" />
+ <source path="shared" />
+</module>
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/meets/KuneMeets.gwt.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,66 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client;
+
+import static cc.kune.meets.shared.MeetingsConstants.NAME;
+import static cc.kune.meets.shared.MeetingsConstants.TYPE_MEETING;
+import static cc.kune.meets.shared.MeetingsConstants.TYPE_ROOT;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
+import cc.kune.gspace.client.tool.selector.ToolSelector;
+
+import com.google.inject.Inject;
+
+public class MeetingsClientTool extends FoldableAbstractClientTool {
+
+ private final NavResources navResources;
+
+ @Inject
+ public MeetingsClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
+ final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
+ super(NAME, i18n.t("meets"), toolSelector, cntCapRegistry);
+ this.navResources = navResources;
+
+ // registerAclEditableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
+ registerAuthorableTypes(TYPE_MEETING);
+ registerDragableTypes(TYPE_MEETING);
+ registerDropableTypes(TYPE_ROOT);
+ // registerPublishModerableTypes();
+ registerRateableTypes(TYPE_MEETING);
+ registerRenamableTypes(TYPE_MEETING);
+ registerTageableTypes(TYPE_MEETING);
+ registerTranslatableTypes(TYPE_MEETING);
+
+ registerIcons();
+ }
+
+ @Override
+ public String getName() {
+ return NAME;
+ }
+
+ private void registerIcons() {
+ registerContentTypeIcon(TYPE_ROOT, navResources.folder());
+ registerContentTypeIcon(TYPE_MEETING, navResources.calendar());
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/MeetingsGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/MeetingsGinModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/MeetingsGinModule.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client;
+
+import cc.kune.meets.client.actions.MeetingsClientActions;
+
+import com.google.inject.Singleton;
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+
+public class MeetingsGinModule extends AbstractPresenterModule {
+
+ @Override
+ protected void configure() {
+ bind(MeetingsClientTool.class).in(Singleton.class);
+ bind(MeetingsClientActions.class).in(Singleton.class);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/MeetingsGinModule.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/MeetingsGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/MeetingsGinjector.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/MeetingsGinjector.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client;
+
+import com.google.gwt.inject.client.Ginjector;
+
+public interface MeetingsGinjector extends Ginjector {
+
+ MeetingsParts getMeetingsParts();
+
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/MeetingsGinjector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/MeetingsParts.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/MeetingsParts.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/MeetingsParts.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client;
+
+import cc.kune.core.client.state.Session;
+import cc.kune.gspace.client.tool.ContentViewerSelector;
+import cc.kune.gspace.client.viewers.ContentViewerPresenter;
+import cc.kune.gspace.client.viewers.FolderViewerPresenter;
+import cc.kune.meets.client.actions.MeetingsClientActions;
+import cc.kune.meets.shared.MeetingsConstants;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class MeetingsParts {
+
+ @Inject
+ public MeetingsParts(final Session session, final Provider<MeetingsClientTool> clientTool,
+ final ContentViewerSelector viewerSelector, final MeetingsClientActions meetsActions,
+ final ContentViewerPresenter contentViewer, final FolderViewerPresenter folderViewer) {
+ clientTool.get();
+ viewerSelector.register(contentViewer, true, MeetingsConstants.TYPE_MEETING);
+ viewerSelector.register(folderViewer, true, MeetingsConstants.TYPE_ROOT);
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/meets/client/MeetingsParts.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/actions/DelMeetingsMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/actions/DelMeetingsMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/actions/DelMeetingsMenuItem.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.DelContentMenuItem;
+
+import com.google.inject.Inject;
+
+public class DelMeetingsMenuItem extends DelContentMenuItem {
+
+ @Inject
+ public DelMeetingsMenuItem(final I18nTranslationService i18n, final DelContentAction action, final CoreResources res) {
+ super(i18n, action, res);
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/actions/DelMeetingsMenuItem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/actions/GoParentFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/actions/GoParentFolderBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/actions/GoParentFolderBtn.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.GoParentContainerBtn;
+
+import com.google.inject.Inject;
+
+public class GoParentFolderBtn extends GoParentContainerBtn {
+
+ @Inject
+ public GoParentFolderBtn(final I18nTranslationService i18n, final GoParentContainerAction action,
+ final CoreResources res) {
+ super(i18n, action, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/actions/GoParentFolderBtn.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/actions/MeetingsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/actions/MeetingsClientActions.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/actions/MeetingsClientActions.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,67 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.meets.client.actions;
+
+import static cc.kune.meets.shared.MeetingsConstants.TYPE_MEETING;
+import static cc.kune.meets.shared.MeetingsConstants.TYPE_ROOT;
+import cc.kune.core.client.actions.ActionRegistryByType;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
+import cc.kune.gspace.client.actions.ActionGroups;
+import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;
+import cc.kune.gspace.client.actions.ParticipateInContentBtn;
+import cc.kune.gspace.client.actions.RefreshContentMenuItem;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class MeetingsClientActions extends AbstractFoldableToolActions {
+ final String[] all = { TYPE_ROOT, TYPE_MEETING };
+ final String[] containers = { TYPE_ROOT };
+ final String[] containersNoRoot = {};
+ final String[] contents = { TYPE_MEETING };
+
+ @Inject
+ public MeetingsClientActions(final I18nUITranslationService i18n, final Session session,
+ final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
+ final Provider<NewMeetingsBtn> newMeetingsBtn, final Provider<GoParentFolderBtn> folderGoUp,
+ final Provider<OpenMeetingsMenuItem> openContentMenuItem,
+ final Provider<DelMeetingsMenuItem> delContentMenuItem,
+ final Provider<ContentViewerOptionsMenu> optionsMenuContent,
+ final Provider<ParticipateInContentBtn> participateBtn,
+ final Provider<RefreshContentMenuItem> refresh) {
+ super(session, stateManager, i18n, registry);
+ actionsRegistry.addAction(ActionGroups.VIEW, optionsMenuContent, all);
+ actionsRegistry.addAction(ActionGroups.VIEW, refresh, all);
+ actionsRegistry.addAction(ActionGroups.VIEW, newMeetingsBtn, containers);
+ actionsRegistry.addAction(ActionGroups.VIEW, participateBtn, contents);
+ actionsRegistry.addAction(ActionGroups.VIEW, folderGoUp, contents);
+ actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, contents);
+ actionsRegistry.addAction(ActionGroups.MENUITEM, openContentMenuItem, containersNoRoot);
+ actionsRegistry.addAction(ActionGroups.MENUITEM, delContentMenuItem, contents);
+ }
+
+ @Override
+ protected void createPostSessionInitActions() {
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/actions/MeetingsClientActions.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/actions/NewMeetingsBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/actions/NewMeetingsBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/actions/NewMeetingsBtn.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client.actions;
+
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContentBtn;
+import cc.kune.meets.shared.MeetingsConstants;
+
+import com.google.inject.Inject;
+
+public class NewMeetingsBtn extends NewContentBtn {
+
+ @Inject
+ public NewMeetingsBtn(final I18nTranslationService i18n, final NewContentAction action,
+ final NavResources res, final GlobalShortcutRegister shorcutReg) {
+ super(i18n, action, res.calendarAdd(), shorcutReg, i18n.t("New meeting"),
+ i18n.t("Create a New Meeting here"), i18n.t("New meeting"), MeetingsConstants.TYPE_MEETING);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/actions/NewMeetingsBtn.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/client/actions/OpenMeetingsMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/actions/OpenMeetingsMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/client/actions/OpenMeetingsMenuItem.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.OpenContentMenuItem;
+
+import com.google.inject.Inject;
+
+public class OpenMeetingsMenuItem extends OpenContentMenuItem {
+
+ @Inject
+ public OpenMeetingsMenuItem(final I18nTranslationService i18n, final OpenContentAction action, final NavResources res) {
+ super(i18n, action, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/meets/client/actions/OpenMeetingsMenuItem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/server/MeetingServerModule.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/server/MeetingServerModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/server/MeetingServerModule.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,29 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.server;
+
+import com.google.inject.Binder;
+import com.google.inject.Module;
+
+public class MeetingServerModule implements Module {
+ public void configure(final Binder binder) {
+ binder.bind(MeetingServerTool.class).asEagerSingleton();
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/meets/server/MeetingServerModule.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,164 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.server;
+
+import static cc.kune.meets.shared.MeetingsConstants.NAME;
+import static cc.kune.meets.shared.MeetingsConstants.ROOT_NAME;
+import static cc.kune.meets.shared.MeetingsConstants.TYPE_MEETING;
+import static cc.kune.meets.shared.MeetingsConstants.TYPE_ROOT;
+
+import java.net.URL;
+import java.util.Date;
+
+import cc.kune.core.client.errors.ContainerNotPermittedException;
+import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.tool.ServerToolTarget;
+import cc.kune.core.server.tool.ServerWaveTool;
+import cc.kune.core.server.utils.UrlUtils;
+import cc.kune.core.shared.domain.ContentStatus;
+import cc.kune.core.shared.domain.GroupListMode;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.domain.AccessLists;
+import cc.kune.domain.Container;
+import cc.kune.domain.Content;
+import cc.kune.domain.Group;
+import cc.kune.domain.ToolConfiguration;
+import cc.kune.domain.User;
+
+import com.google.inject.Inject;
+
+public class MeetingServerTool implements ServerWaveTool {
+
+ private static final String MEETING_GADGET = "http://mass-mob.appspot.com/massmob/org.ourproject.massmob.client.MassmobGadget.gadget.xml";
+ private final ToolConfigurationManager configurationManager;
+ private final ContainerManager containerManager;
+ private final ContentManager contentManager;
+ private final URL gadgetUrl;
+ private final I18nTranslationService i18n;
+
+ @Inject
+ public MeetingServerTool(final ContentManager contentManager, final ContainerManager containerManager,
+ final ToolConfigurationManager configurationManager,
+ final I18nTranslationService translationService) {
+ this.contentManager = contentManager;
+ this.containerManager = containerManager;
+ this.configurationManager = configurationManager;
+ this.i18n = translationService;
+ gadgetUrl = UrlUtils.of(MEETING_GADGET);
+ }
+
+ void checkContainerTypeId(final String parentTypeId, final String typeId) {
+ throw new ContainerNotPermittedException();
+ }
+
+ void checkContentTypeId(final String parentTypeId, final String typeId) {
+ if (typeId.equals(TYPE_MEETING)) {
+ // ok valid content
+ final boolean parentIsFolderOrRoot = parentTypeId.equals(TYPE_ROOT);
+ if ((typeId.equals(TYPE_MEETING) && parentIsFolderOrRoot)) {
+ // ok
+ } else {
+ throw new ContentNotPermittedException();
+ }
+ } else {
+ throw new ContentNotPermittedException();
+ }
+ }
+
+ @Override
+ public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
+ checkContainerTypeId(parentTypeId, typeId);
+ }
+
+ @Override
+ public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
+ checkContentTypeId(parentTypeId, typeId);
+ }
+
+ @Override
+ public URL getGadgetUrl() {
+ return gadgetUrl;
+ }
+
+ @Override
+ public String getName() {
+ return NAME;
+ }
+
+ @Override
+ public String getRootName() {
+ return ROOT_NAME;
+ }
+
+ @Override
+ public ServerToolTarget getTarget() {
+ return ServerToolTarget.forGroups;
+ }
+
+ @Override
+ public Group initGroup(final User user, final Group group, final Object... otherVars) {
+ final ToolConfiguration config = new ToolConfiguration();
+ final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT);
+ setContainerMeetingsAcl(rootFolder);
+ config.setRoot(rootFolder);
+ group.setToolConfig(NAME, config);
+ configurationManager.persist(config);
+ final Content content = contentManager.createContent(
+ i18n.t("Meeting sample"),
+ i18n.t("This is only a meet sample. You can invite other participants to this meeting, but also publish to the general public allowing you to to help in the organization, call and speed-up of events."),
+ user, rootFolder, TYPE_MEETING, gadgetUrl);
+ content.addAuthor(user);
+ content.setLanguage(user.getLanguage());
+ content.setTypeId(TYPE_MEETING);
+ content.setStatus(ContentStatus.publishedOnline);
+ contentManager.save(user, content);
+ return group;
+ }
+
+ @Override
+ public void onCreateContainer(final Container container, final Container parent) {
+ setContainerMeetingsAcl(container);
+ }
+
+ @Override
+ public void onCreateContent(final Content content, final Container parent) {
+ content.setStatus(ContentStatus.publishedOnline);
+ content.setPublishedOn(new Date());
+ }
+
+ @Override
+ @Inject
+ public void register(final ServerToolRegistry registry) {
+ registry.register(this);
+ }
+
+ private void setContainerMeetingsAcl(final Container container) {
+ final AccessLists meetsAcl = new AccessLists();
+ meetsAcl.getAdmins().setMode(GroupListMode.NORMAL);
+ meetsAcl.getAdmins().add(container.getOwner());
+ meetsAcl.getEditors().setMode(GroupListMode.NORMAL);
+ meetsAcl.getViewers().setMode(GroupListMode.EVERYONE);
+ containerManager.setAccessList(container, meetsAcl);
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java (rev 0)
+++ trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -0,0 +1,31 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.meets.shared;
+
+public final class MeetingsConstants {
+
+ public static final String NAME = "meets";
+ public static final String ROOT_NAME = "meets";
+ public static final String TYPE_MEETING = NAME + "." + "meet";
+ public static final String TYPE_ROOT = NAME + "." + "root";
+
+ private MeetingsConstants() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WebClient.java 2011-05-10 19:13:22 UTC (rev 1371)
+++ trunk/src/main/java/cc/kune/wave/client/WebClient.java 2011-05-10 21:49:41 UTC (rev 1372)
@@ -171,7 +171,7 @@
getStackTraceAsync(e, new Accessor<SafeHtml>() {
@Override
public void use(final SafeHtml stack) {
- NotifyUser.error("Oops! Something has gone wrong. Please contact the site admins with <em>more details</em>");
+ //NotifyUser.error("Oops! Something has gone wrong. Please contact the site admins with <em>more details</em>");
// error.addDetail(stack, null);
final String message = stack.asString().replace("<br>", "\n");
REMOTE_LOG.severe(message);
More information about the kune-commits
mailing list