You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2011/04/01 18:42:42 UTC
svn commit: r1087796 [13/37] - in /incubator/rave/donations/mitre-osec: ./
conf/ db/ db/data/ db/sequences/ db/tables/ lib/ lib/apache-commons/
lib/apache-taglibs/ lib/build/ lib/build/cobertura/ lib/eclipselink/
lib/freemarker/ lib/google-collections/...
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/controller/RepositoryController.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/controller/WizardController.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/controller/WizardController.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/controller/WizardController.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/controller/WizardController.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,112 @@
+/*
+ * 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.mitre.portal.web.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.model.UserWizardCompleted;
+import org.mitre.portal.model.Wizard;
+import org.mitre.portal.security.UserService;
+import org.mitre.portal.service.WizardService;
+import org.mitre.portal.service.exception.WizardNotFoundException;
+import org.mitre.portal.web.model.JsonRpcResult;
+import org.mitre.portal.web.util.ModelKeys;
+import org.mitre.portal.web.util.ViewNames;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+@Controller
+@RequestMapping(value="/wizard/*")
+public class WizardController {
+ private final Log log = LogFactory.getLog(getClass());
+
+ private final WizardService wizardService;
+ private final UserService userService;
+
+ @Autowired
+ public WizardController(WizardService wizardService, UserService userService)
+ {
+ this.userService = userService;
+ this.wizardService = wizardService;
+ }
+
+ @RequestMapping(value="saveUserWizardCompleted", method = RequestMethod.POST)
+ public String saveUserWizardCompleted(@RequestParam Long wizardId, Model model, HttpServletRequest request)
+ {
+ JsonRpcResult result = new JsonRpcResult();
+ Person user = userService.getCurrentAuthenticatedUser();
+
+ try {
+ Wizard wizard = wizardService.getWizard(wizardId);
+ UserWizardCompleted userWizardCompleted = new UserWizardCompleted();
+ userWizardCompleted.setUserId(user.getUserId());
+ userWizardCompleted.setWizard(wizard);
+
+ log.debug("attempting to save new userWizardCompleted: " + userWizardCompleted);
+ wizardService.save(userWizardCompleted);
+
+ // remove this wizard from the user's non-completed list, and if the list becomes empty,
+ // remove it completely from the session
+ HttpSession session = request.getSession();
+ List<Wizard> nonCompletedWizards = (List<Wizard>) session.getAttribute(ModelKeys.NONCOMPLETED_WIZARDS);
+ if (nonCompletedWizards != null) {
+ nonCompletedWizards.remove(wizard);
+ if (nonCompletedWizards.isEmpty()) {
+ session.removeAttribute(ModelKeys.NONCOMPLETED_WIZARDS);
+ }
+ }
+
+ //The update was successful. Return a successful result to the client
+ result.setConsoleMessage("");
+ result.setDisplayMessage("Successfully persisted userWizardCompleted");
+ result.setResult(true);
+ }
+ catch (WizardNotFoundException e) {
+ log.error("wizardId " + wizardId + " not found ", e);
+ result.setDisplayMessage("wizardId " + wizardId + " not found");
+ result.setResult(false);
+ result.setConsoleMessage(e.getClass().getName());
+ }
+ catch(Exception e) {
+ log.error("Caught unknown exception", e);
+ result.setDisplayMessage("There was an unknown error persisting userWizardCompleted");
+ result.setResult(false);
+ result.setConsoleMessage(e.getClass().getName());
+ }
+
+ //TODO: Need to create a new JSON view class that extends the open source package's and sets the response code
+ //to an error code when Success == false for JsonRpcResult
+ model.asMap().put(ModelKeys.JSON_RESULT, result);
+
+ return ViewNames.JSON;
+ }
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/controller/WizardController.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadget.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadget.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadget.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadget.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,174 @@
+/*
+ * 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.mitre.portal.web.model;
+
+import org.mitre.portal.model.Gadget;
+
+/**
+ * @author acarlucci
+ */
+public class JsonGadget {
+ private Long id;
+ private String title;
+ private String description;
+ private String author;
+ private String url;
+ private String thumbnailUrl;
+ private String screenshotUrl;
+ private Long gadgetSupportLinkTypeId;
+ private String gadgetSupportLinkTypeCode;
+ private String gadgetSupportLinkTypeDesc;
+ private boolean userCanEdit;
+ private boolean scrolling;
+ private Long height;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ public String getThumbnailUrl() {
+ return thumbnailUrl;
+ }
+
+ public void setThumbnailUrl(String thumbnailUrl) {
+ this.thumbnailUrl = thumbnailUrl;
+ }
+
+ public String getScreenshotUrl() {
+ return screenshotUrl;
+ }
+
+ public void setScreenshotUrl(String screenshotUrl) {
+ this.screenshotUrl = screenshotUrl;
+ }
+
+ public boolean isUserCanEdit() {
+ return userCanEdit;
+ }
+
+ public void setUserCanEdit(boolean userCanEdit) {
+ this.userCanEdit = userCanEdit;
+ }
+
+ public Long getGadgetSupportLinkTypeId() {
+ return gadgetSupportLinkTypeId;
+ }
+
+ public void setGadgetSupportLinkTypeId(Long gadgetSupportLinkTypeId) {
+ this.gadgetSupportLinkTypeId = gadgetSupportLinkTypeId;
+ }
+
+ public String getGadgetSupportLinkTypeCode() {
+ return gadgetSupportLinkTypeCode;
+ }
+
+ public void setGadgetSupportLinkTypeCode(String gadgetSupportLinkTypeCode) {
+ this.gadgetSupportLinkTypeCode = gadgetSupportLinkTypeCode;
+ }
+
+ public String getGadgetSupportLinkTypeDesc() {
+ return gadgetSupportLinkTypeDesc;
+ }
+
+ public void setGadgetSupportLinkTypeDesc(String gadgetSupportLinkTypeDesc) {
+ this.gadgetSupportLinkTypeDesc = gadgetSupportLinkTypeDesc;
+ }
+
+ public boolean isScrolling() {
+ return scrolling;
+ }
+
+ public void setScrolling(boolean scrolling) {
+ this.scrolling = scrolling;
+ }
+
+ public Long getHeight() {
+ return height;
+ }
+
+ public void setHeight(Long height) {
+ this.height = height;
+ }
+
+ public static JsonGadget createFromModel(Gadget gadget, boolean userCanEdit) {
+ JsonGadget jsonGadget = new JsonGadget();
+ if (gadget != null) {
+ jsonGadget.setId(gadget.getGadgetId());
+ jsonGadget.setAuthor(gadget.getAuthor() != null ? gadget.getAuthor() : "");
+ jsonGadget.setDescription(gadget.getDescription() != null ? gadget.getDescription() : "");
+ jsonGadget.setThumbnailUrl(gadget.getThumbnailUrl() != null ? gadget.getThumbnailUrl().toString() : "");
+ jsonGadget.setScreenshotUrl(gadget.getScreenshotUrl() != null ? gadget.getScreenshotUrl().toString() : "");
+ jsonGadget.setTitle(gadget.getTitle() != null ? gadget.getTitle() : "");
+ jsonGadget.setUrl(gadget.getUrl() != null ? gadget.getUrl().toString() : "");
+
+ if (gadget.getGadgetSupportLinkType() == null) {
+ jsonGadget.setGadgetSupportLinkTypeId(null);
+ jsonGadget.setGadgetSupportLinkTypeCode("");
+ jsonGadget.setGadgetSupportLinkTypeDesc("");
+ } else {
+ jsonGadget.setGadgetSupportLinkTypeId(gadget.getGadgetSupportLinkType().getGadgetSupportLinkTypeId());
+ jsonGadget.setGadgetSupportLinkTypeCode(gadget.getGadgetSupportLinkType().getCode() != null ? gadget.getGadgetSupportLinkType().getCode() : "");
+ jsonGadget.setGadgetSupportLinkTypeDesc(gadget.getGadgetSupportLinkType().getDescription() != null ? gadget.getGadgetSupportLinkType().getDescription() : "");
+ }
+
+ jsonGadget.setUserCanEdit(userCanEdit);
+ jsonGadget.setScrolling(gadget.isScrolling());
+ jsonGadget.setHeight(gadget.getHeight());
+ }
+
+ return jsonGadget;
+ }
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadget.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadgetEventArgs.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadgetEventArgs.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadgetEventArgs.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadgetEventArgs.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,85 @@
+/*
+ * 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.mitre.portal.web.model;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: MFRANKLIN
+ * Date: Jun 15, 2009
+ * Time: 9:41:08 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JsonGadgetEventArgs {
+ private Long pageId;
+ private Long gadgetId;
+ private Long regionGadgetId;
+ private int position;
+ private String regionName;
+ private boolean collapsed;
+
+ public Long getPageId() {
+ return pageId;
+ }
+
+ public void setPageId(Long pageId) {
+ this.pageId = pageId;
+ }
+
+ public Long getGadgetId() {
+ return gadgetId;
+ }
+
+ public void setGadgetId(Long gadgetId) {
+ this.gadgetId = gadgetId;
+ }
+
+ public Long getRegionGadgetId() {
+ return regionGadgetId;
+ }
+
+ public void setRegionGadgetId(Long regionGadgetId) {
+ this.regionGadgetId = regionGadgetId;
+ }
+
+ public int getPosition() {
+ return position;
+ }
+
+ public void setPosition(int position) {
+ this.position = position;
+ }
+
+ public String getRegionName() {
+ return regionName;
+ }
+
+ public void setRegionName(String regionName) {
+ this.regionName = regionName;
+ }
+
+ public boolean isCollapsed() {
+ return collapsed;
+ }
+
+ public void setCollapsed(boolean collapsed) {
+ this.collapsed = collapsed;
+ }
+
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonGadgetEventArgs.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPage.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPage.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPage.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPage.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,52 @@
+/*
+ * 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.mitre.portal.web.model;
+
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: MFRANKLIN
+ * Date: Jun 10, 2009
+ * Time: 3:45:52 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JsonPage {
+
+ private Long pageId;
+
+ public Long getPageId() {
+ return pageId;
+ }
+
+ public void setPageId(Long pageId) {
+ this.pageId = pageId;
+ }
+
+ public List<JsonRegion> getRegions() {
+ return regions;
+ }
+
+ public void setRegions(List<JsonRegion> regions) {
+ this.regions = regions;
+ }
+
+ private List<JsonRegion> regions;
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPage.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPageExist.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPageExist.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPageExist.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPageExist.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,60 @@
+/*
+ * 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.mitre.portal.web.model;
+
+public class JsonPageExist {
+
+ private boolean pageExists;
+ private String pageName;
+ private String userId;
+ private String errorMessage;
+
+ public boolean isPageExists() {
+ return pageExists;
+ }
+
+ public void setPageExists(boolean pageExists) {
+ this.pageExists = pageExists;
+ }
+
+ public String getPageName() {
+ return pageName;
+ }
+
+ public void setPageName(String pageName) {
+ this.pageName = pageName;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonPageExist.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRegion.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRegion.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRegion.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRegion.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,51 @@
+/*
+ * 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.mitre.portal.web.model;
+
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: MFRANKLIN
+ * Date: Jun 10, 2009
+ * Time: 3:46:54 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JsonRegion {
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public List<JsonGadget> getGadgets() {
+ return gadgets;
+ }
+
+ public void setGadgets(List<JsonGadget> gadgets) {
+ this.gadgets = gadgets;
+ }
+
+ private List<JsonGadget> gadgets;
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRegion.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRpcResult.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRpcResult.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRpcResult.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRpcResult.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,58 @@
+/*
+ * 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.mitre.portal.web.model;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: MFRANKLIN
+ * Date: Jun 11, 2009
+ * Time: 5:38:08 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JsonRpcResult {
+
+ private boolean result;
+ private String displayMessage;
+ private String consoleMessage;
+
+ public boolean isResult() {
+ return result;
+ }
+
+ public void setResult(boolean result) {
+ this.result = result;
+ }
+
+ public String getDisplayMessage() {
+ return displayMessage;
+ }
+
+ public void setDisplayMessage(String displayMessage) {
+ this.displayMessage = displayMessage;
+ }
+
+ public String getConsoleMessage() {
+ return consoleMessage;
+ }
+
+ public void setConsoleMessage(String consoleMessage) {
+ this.consoleMessage = consoleMessage;
+ }
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonRpcResult.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonSecurityToken.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonSecurityToken.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonSecurityToken.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonSecurityToken.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,64 @@
+/*
+ * 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.mitre.portal.web.model;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: JCIAN
+ * Date: Aug 10, 2010
+ * Time: 9:15:57 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JsonSecurityToken {
+ private String gadgetId;
+ private String securityToken;
+
+ public JsonSecurityToken() {
+ }
+
+ public JsonSecurityToken(String gadgetId, String securityToken) {
+ this.gadgetId = gadgetId;
+ this.securityToken = securityToken;
+ }
+
+ public String getGadgetId() {
+ return gadgetId;
+ }
+
+ public void setGadgetId(String gadgetId) {
+ this.gadgetId = gadgetId;
+ }
+
+ public String getSecurityToken() {
+ return securityToken;
+ }
+
+ public void setSecurityToken(String securityToken) {
+ this.securityToken = securityToken;
+ }
+
+ @Override
+ public String toString() {
+ return "JsonSecurityToken{" +
+ "gadgetId='" + gadgetId + '\'' +
+ ", securityToken='" + securityToken + '\'' +
+ '}';
+ }
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/model/JsonSecurityToken.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/CommonModelHandlerInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/CommonModelHandlerInterceptor.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/CommonModelHandlerInterceptor.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/CommonModelHandlerInterceptor.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,89 @@
+/*
+ * 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.mitre.portal.web.util;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mitre.portal.model.Container;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.model.Page;
+import org.mitre.portal.security.UserService;
+import org.mitre.portal.service.PageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class CommonModelHandlerInterceptor extends HandlerInterceptorAdapter
+{
+ private final Log log = LogFactory.getLog(CommonModelHandlerInterceptor.class);
+
+ private final PageService pageService;
+ private final UserService userService;
+ private Container container;
+
+ @Autowired
+ public CommonModelHandlerInterceptor(PageService pageService,
+ UserService userService,
+ Container container)
+ {
+ this.pageService = pageService;
+ this.userService = userService;
+ this.container = container;
+ }
+
+ @Override
+ public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception
+ {
+ log.debug("adding common model attributes for " + handler.getClass().getName());
+
+ if (modelAndView != null && !ViewNames.JSON.equals(modelAndView.getViewName()))
+ {
+ ModelMap map = modelAndView.getModelMap();
+ // load the container's host and port from the request object
+ String containerUrl = request.getScheme() + "://" + request.getServerName();
+ if (request.getServerPort() != -1)
+ containerUrl += ":" + request.getServerPort();
+ map.addAttribute(ModelKeys.CONTAINER_HOST_AND_PORT_URL, containerUrl);
+ }
+
+ //be sure to set LAST_VISITED_PAGE_ID to the default page
+ if (modelAndView != null && !modelAndView.getModelMap().containsKey(ModelKeys.LAST_VISITED_PAGE_ID)) {
+ // see if we can grab it from the session object first, if not get the user's default page
+ Long lastVisitedPageId = (Long) request.getSession().getAttribute("lastVisitedPageId");
+ if (lastVisitedPageId == null) {
+ Person user = userService.getCurrentAuthenticatedUser();
+ Page page = pageService.findDefaultPage(container, user);
+ lastVisitedPageId = page.getPageId();
+ }
+ modelAndView.getModelMap().addAttribute(ModelKeys.LAST_VISITED_PAGE_ID, lastVisitedPageId);
+ }
+
+
+ super.postHandle(request, response, handler, modelAndView);
+ }
+
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/CommonModelHandlerInterceptor.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultContextLoaderListener.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultContextLoaderListener.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultContextLoaderListener.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultContextLoaderListener.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,135 @@
+/*
+ * 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.mitre.portal.web.util;
+
+import java.lang.reflect.Method;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.ResourceBundle;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.sql.DataSource;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.web.context.ContextLoaderListener;
+
+/**
+ * Extention of the Spring ContextLoaderListener with some additional
+ * contextDestroyed logic to:
+ * <ol>
+ * <li>De-register the JDBC drivers when the application shuts down. This is a possible solution to the PermGen Out of Memory errors occationally seen in Tomcat.
+ *
+ * <li>Close the Data Source Connection Pool when the context shuts down.
+ * Tomcat does not close pools created from JNDI as they are a shared resource,
+ * but we want to close all the pooled connections anytime the application is shutdown/redeployed
+ * </ol>
+ *
+ * @author ACARLUCCI
+ */
+public class DefaultContextLoaderListener extends ContextLoaderListener
+{
+ // jndi data source path
+ private final String JNDI_DATA_SOURCE_PATH = "java:/comp/env/jdbc/MYMIIDataSource";
+ private final String DBCP_CLOSE_METHOD = "close";
+ private final String LOG_DIVIDER = "*************************************";
+
+ private final Log log = LogFactory.getLog(DefaultContextLoaderListener.class);
+ private static final String PORTAL_PROPERTIES = "portal_properties";
+
+ @Override
+ public void contextInitialized(ServletContextEvent event) {
+ super.contextInitialized(event);
+ //get the servlet context
+ ServletContext servletContext = event.getServletContext();
+
+ //set an instance of our Constants class into the application context under the key provided
+ servletContext.setAttribute(PORTAL_PROPERTIES, ResourceBundle.getBundle("application"));
+ }
+
+ @Override
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ log.info("\n");
+ log.info(LOG_DIVIDER);
+ log.info(LOG_DIVIDER);
+ log.info("DESTROYING WEB CONTEXT");
+ super.contextDestroyed(event);
+
+ // de-register jdbc drivers
+ log.info("searching for JDBC drivers to de-register...");
+ try {
+ for (Enumeration e = DriverManager.getDrivers(); e.hasMoreElements(); )
+ {
+ Driver driver = (Driver) e.nextElement();
+ if (driver.getClass().getClassLoader() == getClass().getClassLoader())
+ {
+ log.info("de-registering JDBC driver: " + driver.getClass().getName());
+ DriverManager.deregisterDriver(driver);
+ }
+ }
+ }
+ catch (Exception e) {
+ log.error("Unable to clean up JDBC driver: " + e.getMessage());
+ }
+
+ // close the jndi connection pool
+ ServletContext application = event.getServletContext();
+ try {
+ log.debug("Looking up DataSource from Context...");
+ Context ctx = new InitialContext();
+ DataSource ds = (DataSource)ctx.lookup(JNDI_DATA_SOURCE_PATH);
+
+ if (ds == null) {
+ log.error("no DataSource found at " + JNDI_DATA_SOURCE_PATH);
+ }
+ else {
+ log.info("Attempting to close DataSource " + JNDI_DATA_SOURCE_PATH);
+ closeDataSource(ds, application);
+ log.info("DataSource " + JNDI_DATA_SOURCE_PATH + " closed successfully!");
+ }
+ }
+ catch (NamingException ne) {
+ log.error("unable to locate DataSource at " + JNDI_DATA_SOURCE_PATH, ne);
+ }
+
+ log.info("FINISHED DESTROYING WEB CONTEXT");
+ log.info(LOG_DIVIDER);
+ log.info(LOG_DIVIDER);
+ log.info("\n");
+ }
+
+ private void closeDataSource(DataSource ds, ServletContext application) {
+ try {
+ Method closeMethod = ds.getClass().getMethod(DBCP_CLOSE_METHOD, (Class<?>[])null);
+ if(closeMethod == null)
+ throw new NoSuchMethodException(ds.getClass().getName() + "." + DBCP_CLOSE_METHOD + "()");
+
+ closeMethod.invoke(ds, (Object[])null);
+ }
+ catch (Exception e) {
+ log.error("Cannot close DataSource", e);
+ }
+ }
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultContextLoaderListener.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultExceptionHandler.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultExceptionHandler.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultExceptionHandler.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultExceptionHandler.java Fri Apr 1 16:42:22 2011
@@ -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.mitre.portal.web.util;
+
+import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author Ryan Amari
+ */
+public class DefaultExceptionHandler extends SimpleMappingExceptionResolver {
+
+ @Override
+ public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception exception) {
+ logger.error("Exception resolver caught exception", exception);
+ return super.resolveException(request, response, handler, exception);
+ }
+
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/DefaultExceptionHandler.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/JsonUtils.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/JsonUtils.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/JsonUtils.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/JsonUtils.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,36 @@
+/*
+ * 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.mitre.portal.web.util;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+
+/**
+ * @author ACARLUCCI
+ */
+public class JsonUtils {
+ public static <T> T unmarshall(String json, Class<T> clazz) throws JsonMappingException, JsonParseException, IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ return mapper.readValue(json, clazz);
+ }
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/JsonUtils.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ModelKeys.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ModelKeys.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ModelKeys.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ModelKeys.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,79 @@
+/*
+ * 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.mitre.portal.web.util;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public final class ModelKeys {
+ // common objects
+ public final static String CONTAINER_HOST_AND_PORT_URL = "containerUrl";
+ public final static String CONTAINER = "container";
+ public final static String FORM_SUCCESS_STATUS = "formSuccessStatus";
+ public final static String JSON_RESULT = "result";
+ public final static String JSON_GADGET = "gadget";
+ public final static String USER_AGENT = "userAgent";
+
+ // gadget objects
+ public final static String GADGET = "gadget";
+ public final static String GADGET_ID = "gadgetId";
+ public final static String GADGET_SUPPORT_LINK_TYPE_LIST = "gadgetSupportLinkTypeList";
+ public final static String GADGET_AUTHOR_TYPE_LIST = "gadgetAuthorTypeList";
+ public final static String GADGET_AUDIENCE_LIST = "gadgetAudienceList";
+ public final static String GADGET_ALSO_BY_LIST = "gadgetAlsoByList";
+ public static final String GADGET_STATISTICS = "gadgetStatistics";
+ public static final String ALL_GADGET_STATISTICS = "allGadgetStatistics";
+ public static final String USER_GADGET_RATINGS = "userGadgetRatings";
+ public static final String GADGET_AUDIENCE_NOT_FOUND = "gadgetAudienceNotFound";
+ public static final String GADGET_URL = "gadgetUrl";
+ public final static String SECURITY_ROLES_LIST = "securityRoles";
+ public final static String SECURITY_USER_ROLE_LIST = "securityUserRole";
+ public final static String SECURITY_USER_ROLE_USER_ID = "securityRoleUserId";
+
+
+ // page objects
+ public final static String PAGE = "page";
+ public final static String PAGES = "pages";
+ public final static String PAGE_TEMPLATES = "pageTemplates";
+ public final static String PAGE_LAYOUTS = "pageLayouts";
+ public final static String RANDOM_NUM_GENERATOR = "randomGen";
+ public final static String LAST_VISITED_PAGE_ID = "lastVisitedPageId"; // this is used as a session model object
+
+ // repository objects
+ public final static String GADGET_REPOSITORY_LIST = "gadgetRepositoryList";
+ public final static String AUDIENCE_TAG_CLOUD = "audienceCloud";
+ public final static String TAGS_TAG_CLOUD = "tagCloud";
+ public final static String GADGET_COMMENTS = "gadgetComments";
+ public final static String PERSONS_WITH_COMMENTS_MAP = "personsWithCommentsMap";
+
+ // region gadget objects
+ public final static String REGION_GADGET = "regionGadget";
+ public final static String REGION_GADGET_ID = "regionGadgetId";
+
+ //gadget search type
+ public final static String GADGET_SEARCH_TYPE = "gadgetSearchType";
+ public final static String GADGET_SEARCH_STRING = "gadgetSearchString";
+ public final static String GADGET_SEARCH_TAGNAME = "gadgetSearchTagName";
+ public final static String GADGET_SEARCH_AUDIENCE = "gadgetSearchAudience";
+
+ // wizards
+ public final static String NONCOMPLETED_WIZARDS = "nonCompletedWizards";
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ModelKeys.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalAuthenticationFilter.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalAuthenticationFilter.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalAuthenticationFilter.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalAuthenticationFilter.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,58 @@
+/*
+ * 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.mitre.portal.web.util;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.service.WizardService;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter;
+
+/**
+ * This class extends Spring's RequestHeaderAuthenticationFilter so we can add some
+ * custom hooks into the successfulAuthentication method to handle tasks
+ * that should happen with every session login.
+ *
+ * @author ACARLUCCI
+ */
+public class PortalAuthenticationFilter extends RequestHeaderAuthenticationFilter {
+
+ private WizardService wizardService;
+
+ public PortalAuthenticationFilter(WizardService wizardService) {
+ this.wizardService = wizardService;
+ }
+
+ /**
+ * Override of the successfulAuthentication method to check if the user
+ * has any new wizards they need to see upon logging in
+ *
+ * @param request
+ * @param response
+ * @param authResult
+ */
+ @Override
+ protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) {
+ super.successfulAuthentication(request, response, authResult);
+ // add the list of non completed wizards to the session model so the application can handle them as needed
+ request.getSession().setAttribute(ModelKeys.NONCOMPLETED_WIZARDS, wizardService.findNonCompletedWizardsByUser((Person) authResult.getPrincipal()));
+ }
+}
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalAuthenticationFilter.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalMappingJacksonJsonView.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalMappingJacksonJsonView.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalMappingJacksonJsonView.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalMappingJacksonJsonView.java Fri Apr 1 16:42:22 2011
@@ -0,0 +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.mitre.portal.web.util;
+
+import org.springframework.web.servlet.view.json.MappingJacksonJsonView;
+import java.util.Map;
+
+public class PortalMappingJacksonJsonView extends MappingJacksonJsonView {
+ /**
+ * Overrides the default Spring implementation to make it return a single object instead of a Map in the case where
+ * we end up with only one value. This allows the single object to be the root of the JSON data.
+ *
+ * @param model
+ * @return
+ */
+ @Override
+ protected Object filterModel(Map<String, Object> model) {
+ Map<String, Object> result = (Map<String, Object>) super.filterModel(model);
+ return result.size() == 1 ? result.values().iterator().next() : result;
+ }
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/PortalMappingJacksonJsonView.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ViewNames.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ViewNames.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ViewNames.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ViewNames.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,67 @@
+/*
+ * 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.mitre.portal.web.util;
+
+/**
+ * @author ACARLUCCI
+ */
+public class ViewNames {
+ public static final String JSON = "jsonView";
+
+ public static class Page {
+ private static final String PREFIX = "templates.page.";
+ private static final String VIEW = PREFIX + "view";
+ public static final String ADD_PAGE = PREFIX + "page_add";
+
+ public static String getPageView(String layoutName) {
+ return new StringBuilder(VIEW).append(".").append(layoutName).toString();
+ }
+ }
+
+ public static class Repository {
+ private static final String PREFIX = "templates.repository.";
+ public static final String LIST = PREFIX + "repository_list";
+ public static final String ADD = PREFIX + "repository_add";
+ public static final String EDIT = PREFIX + "repository_edit";
+ public static final String LIST_TEMPLATE = PREFIX + "list_template";
+ public static final String GADGET_DETAIL_TEMPLATE = PREFIX + "gadget_details_view";
+ }
+
+ public static class RegionGadget {
+ private static final String PREFIX = "templates.regiongadget.";
+ public static final String EDIT_PREFS = PREFIX + "edit_prefs";
+ public static final String VIEW_CANVAS = PREFIX + "view_canvas";
+ public static final String VIEW_EDIT_CUSTOM_PREFS = PREFIX + "view_edit_custom_prefs";
+ }
+
+ public static class Admin {
+ private static final String PREFIX = "templates.admin.";
+ public static final String HOME = PREFIX + "home";
+ public static final String GADGET_AUDIENCE = PREFIX + "gadget_audience";
+ public static final String SECURITY_USER_ROLE = PREFIX + "security_user_role";
+ public static final String REFRESH_GADGETS = PREFIX + "gadget_pref_refresh";
+ }
+
+ public static class Error {
+ private static final String PREFIX = "templates.error.";
+ public static final String DEFAULT = PREFIX + "default_error";
+ public static final String ACCESS_DENIED = PREFIX + "access_denied_error";
+ }
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/util/ViewNames.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/GadgetSearchWebService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/GadgetSearchWebService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/GadgetSearchWebService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/GadgetSearchWebService.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,128 @@
+/*
+ * 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.mitre.portal.web.webservice;
+
+import javax.servlet.http.HttpServletResponse;
+import org.mitre.portal.model.Container;
+import org.mitre.portal.model.GadgetAudience;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.security.UserService;
+import org.mitre.portal.service.ContainerService;
+import org.mitre.portal.service.GadgetService;
+import org.mitre.portal.service.StatisticsService;
+import org.mitre.portal.service.exception.GadgetAudienceNotFoundException;
+import org.mitre.portal.service.exception.GadgetNotFoundException;
+import org.mitre.portal.web.util.ModelKeys;
+import org.mitre.portal.web.util.ViewNames;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@Controller
+@RequestMapping("/gadgets/search/")
+public class GadgetSearchWebService
+{
+ private final Container container;
+ private final ContainerService containerService;
+ private final GadgetService gadgetService;
+ private final StatisticsService statisticsService;
+ private UserService userService;
+
+ @Autowired
+ public GadgetSearchWebService(Container container,
+ ContainerService containerService,
+ GadgetService gadgetService,
+ StatisticsService statisticsService,
+ UserService userService)
+ {
+ this.container = container;
+ this.containerService = containerService;
+ this.gadgetService = gadgetService ;
+ this.statisticsService = statisticsService;
+ this.userService = userService;
+ }
+
+ @RequestMapping(value="title-description", method = RequestMethod.GET)
+ public String getByGadgetTitleOrDesc(@RequestParam(value="searchText", required=true) String searchString, Model model, HttpServletResponse response)
+ {
+ Person user = userService.getCurrentAuthenticatedUser();
+ model.addAttribute(ModelKeys.GADGET_REPOSITORY_LIST, containerService.findByGadgetTitleOrDesc(container, searchString.toLowerCase()));
+ model.addAttribute(ModelKeys.GADGET_SEARCH_TYPE, "text");
+ model.addAttribute(ModelKeys.GADGET_SEARCH_STRING, searchString);
+ model.addAttribute(ModelKeys.ALL_GADGET_STATISTICS, statisticsService.getAllGadgetStatistics(user.getUserId(), containerService.findContainerRegistry(container)));
+
+ // prevent this content from being cached by the browser
+ response.setHeader("Cache-Control", "no-cache");
+
+ return ViewNames.Repository.LIST_TEMPLATE;
+ }
+
+
+ @RequestMapping(value="gadgetByTag", method = RequestMethod.GET)
+ public String getGadgetsByTag(@RequestParam(value="tagName") String tagName, Model model, HttpServletResponse response) throws GadgetNotFoundException
+ {
+ Person user = userService.getCurrentAuthenticatedUser();
+ model.addAttribute(ModelKeys.GADGET_REPOSITORY_LIST, containerService.findByTagName(container, tagName));
+ model.addAttribute(ModelKeys.GADGET_SEARCH_TYPE, "tagName");
+ model.addAttribute(ModelKeys.GADGET_SEARCH_TAGNAME, tagName);
+ model.addAttribute(ModelKeys.ALL_GADGET_STATISTICS, statisticsService.getAllGadgetStatistics(user.getUserId(), containerService.findContainerRegistry(container)));
+ // prevent this content from being cached by the browser
+ response.setHeader("Cache-Control", "no-cache");
+ return ViewNames.Repository.LIST_TEMPLATE;
+ }
+
+ @RequestMapping(value="gadgetByAudience", method = RequestMethod.GET)
+ public String getGadgetsByAudience(@RequestParam(value="gadgetAudienceId") Long gadgetAudienceId, Model model, HttpServletResponse response)
+ throws GadgetNotFoundException, GadgetAudienceNotFoundException
+ {
+ Person user = userService.getCurrentAuthenticatedUser();
+ GadgetAudience ga = gadgetService.getGadgetAudience(gadgetAudienceId) ;
+ model.addAttribute(ModelKeys.GADGET_REPOSITORY_LIST, containerService.findByAudience(container, ga));
+ model.addAttribute(ModelKeys.GADGET_SEARCH_TYPE, "audience");
+ model.addAttribute(ModelKeys.GADGET_SEARCH_AUDIENCE, ga);
+ model.addAttribute(ModelKeys.ALL_GADGET_STATISTICS, statisticsService.getAllGadgetStatistics(user.getUserId(), containerService.findContainerRegistry(container)));
+ // prevent this content from being cached by the browser
+ response.setHeader("Cache-Control", "no-cache");
+ return ViewNames.Repository.LIST_TEMPLATE;
+ }
+
+ @RequestMapping(value="gadgetStatistics", method = RequestMethod.GET)
+ public String getGadgetStatistics(@RequestParam(value="gadgetId") Long gadgetId, Model model, HttpServletResponse response)
+ throws GadgetNotFoundException
+ {
+ // get the logged in user
+ Person user = userService.getCurrentAuthenticatedUser();
+ model.addAttribute(ModelKeys.GADGET_STATISTICS, statisticsService.getGadgetStatistics(gadgetId, user.getUserId()));
+ return ViewNames.JSON;
+ }
+
+ @RequestMapping(value="allGadgetStatistics", method = RequestMethod.GET)
+ public String getGadgetStatistics(Model model, HttpServletResponse response)
+ throws GadgetNotFoundException
+ {
+ // get the logged in user
+ Person user = userService.getCurrentAuthenticatedUser();
+ model.addAttribute(ModelKeys.ALL_GADGET_STATISTICS, statisticsService.getAllGadgetStatistics(user.getUserId(), containerService.findContainerRegistry(container)));
+ return ViewNames.JSON;
+ }
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/GadgetSearchWebService.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/SecurityTokenWebService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/SecurityTokenWebService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/SecurityTokenWebService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/SecurityTokenWebService.java Fri Apr 1 16:42:22 2011
@@ -0,0 +1,88 @@
+/*
+ * 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.mitre.portal.web.webservice;
+
+import java.io.IOException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.mitre.portal.security.SecurityTokenService;
+import org.mitre.portal.service.exception.SecurityTokenException;
+import org.mitre.portal.web.model.JsonRpcResult;
+import org.mitre.portal.web.model.JsonSecurityToken;
+import org.mitre.portal.web.util.JsonUtils;
+import org.mitre.portal.web.util.ModelKeys;
+import org.mitre.portal.web.util.ViewNames;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.Collection;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: JCIAN
+ * Date: Aug 10, 2010
+ * Time: 9:13:11 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Controller
+@RequestMapping("/gadgets/securityTokens/")
+public class SecurityTokenWebService {
+ private Log log = LogFactory.getLog(getClass());
+
+ private SecurityTokenService securityTokenService;
+
+ @Autowired
+ public SecurityTokenWebService(SecurityTokenService securityTokenService) {
+ this.securityTokenService = securityTokenService;
+ }
+
+ @RequestMapping(value = "/refresh", method = RequestMethod.POST)
+ public String refreshSecurityTokens(@RequestParam String json, Model model) throws JsonMappingException, JsonParseException, IOException {
+ try {
+ //Parse the JSON with all the existing tokens
+ JsonSecurityToken[] securityTokens = JsonUtils.unmarshall(json, JsonSecurityToken[].class);
+
+ //Refresh the security tokens
+ for (JsonSecurityToken securityToken : securityTokens) {
+ log.debug("Refreshing token: " + securityToken.getSecurityToken());
+ String newEncodedEncryptedSecurityToken = securityTokenService.refreshEncodedEncryptedSecurityToken(securityToken.getSecurityToken());
+ securityToken.setSecurityToken(newEncodedEncryptedSecurityToken);
+ }
+
+ //Add the result to our model
+ model.addAttribute(ModelKeys.JSON_RESULT, securityTokens);
+ } catch (SecurityTokenException e) {
+ log.error("Error while refreshing security tokens", e);
+ JsonRpcResult result = new JsonRpcResult();
+ result.setConsoleMessage(e.getClass().getName());
+ result.setDisplayMessage("There was an error parsing the json request parameter");
+ result.setResult(false);
+ model.addAttribute(ModelKeys.JSON_RESULT, result);
+ }
+
+ return ViewNames.JSON;
+ }
+}
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/web/webservice/SecurityTokenWebService.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/addGadget.png
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/addGadget.png?rev=1087796&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/addGadget.png
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/addGadget.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/dragdrop.png
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/dragdrop.png?rev=1087796&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/dragdrop.png
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/dragdrop.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/maximize.png
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/maximize.png?rev=1087796&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/maximize.png
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/maximize.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/search.png
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/search.png?rev=1087796&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/search.png
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/images/search.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.css
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.css?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.css (added)
+++ incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.css Fri Apr 1 16:42:22 2011
@@ -0,0 +1,88 @@
+
+/*
+ * 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.
+ */
+
+#introPage {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ font-style: normal;
+ font-size: 80%;
+ background-color: #f0f3f5;
+ padding: 1em;
+}
+
+.title {
+ color: #0088cc;
+ font-size: 150%;
+ font-weight: bold;
+}
+
+h2 {
+ color: #0088cc;
+ margin: 1em 0 0.25em 0;
+ padding: 0;
+ font-size: 125%;
+ font-weight: normal;
+}
+
+h3 {
+ color: #759f24;
+ margin: 0.5em 0 0.5em 0;
+ font-size:100%;
+ font-weight: bold;
+}
+
+
+#comments {
+ border: 1px dotted #b4c4cf;
+ padding: 0.5em 0.5em 0.5em 0.75em;
+}
+
+ul {
+ padding-left: 1.5em;
+ margin: 0.5em 0;
+}
+
+li {
+ list-style: square;
+ margin: 1em 0;
+}
+
+#footer {
+ margin-top: 1.5em;
+ text-align:center;
+}
+
+.featureimage {
+ vertical-align:middle;
+ text-align:left;
+
+}
+
+.featuretext{
+
+}
+
+
+td {
+ font-size:80%;
+ vertical-align:top;
+ text-align:left;
+
+}
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.css
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.html
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.html?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.html (added)
+++ incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.html Fri Apr 1 16:42:22 2011
@@ -0,0 +1,85 @@
+<!--
+ ~ 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.
+ -->
+
+<div id="introPage">
+
+<div style="margin-bottom:0.5em;">
+<span class="introPageTitle">We hope you like your Homepage</span>
+<span style="padding-left:2em;"> <button onclick="dijit.byId('wizardDialog_new_user').hide();">Go to Page ></button> </span>
+</div>
+
+<div>Be sure to try out the features and send us your feedback</div>
+
+<div style="clear:both; margin-bottom:1.5em;"></div>
+
+<div id="introPageComments" style="">
+<h2>Comments? Suggestions?</h2>
+<ul>
+<li>Rate and comment on gadgets</li>
+</ul>
+</div>
+
+<div>
+<h2>Some Key Features:</h2>
+
+<div>
+<span class="featuretext">
+<h3>Drag and Drop</h3>
+Easily rearrange your page
+</span>
+<span class="featureimage" id="intro_dragDropImage">
+</span>
+</div>
+<div style="clear:left;"></div>
+
+<div>
+<span class="featuretext">
+<h3>Fullscreen View</h3>
+Expand gadgets for more detail
+</span>
+<span class="featureimage" id="intro_maximizeImage">
+</span>
+</div>
+<div style="clear:left;"></div>
+
+<div width="50%">
+<div style="padding-bottom: 5px;">
+</div>
+<span class="featureimage" id="intro_searchImage">
+</span>
+</div>
+<div style="clear:left;"></div>
+
+<div>
+<span class="featuretext">
+<h3>App Store</h3>
+The place to find and add gadgets to your page with ease
+</span>
+<div class="featureimage" id="intro_addGadgetImage">
+</div>
+</div>
+
+
+</div>
+
+<div style="clear:both;"></div>
+<div id="footer">
+<button onclick="dijit.byId('wizardDialog_new_user').hide();">Go to Page ></button>
+</div>
+</div>
\ No newline at end of file
Propchange: incubator/rave/donations/mitre-osec/static-content/portal/container/content/wizard/new_user.html
------------------------------------------------------------------------------
svn:executable = *