rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject svn commit: r1087796 [9/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/ ...
Date Fri, 01 Apr 2011 16:42:42 GMT
Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/impl/JpaWizardRepository.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/impl/JpaWizardRepository.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/impl/JpaWizardRepository.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/impl/JpaWizardRepository.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.repository.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import javax.persistence.Cache;
+import javax.persistence.EntityManagerFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mitre.portal.model.Wizard;
+import org.mitre.portal.repository.WizardRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.dao.IncorrectResultSizeDataAccessException;
+import org.springframework.orm.jpa.support.JpaDaoSupport;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+@Repository
+@Transactional(readOnly = true)
+public class JpaWizardRepository extends JpaDaoSupport implements WizardRepository
+{
+    protected final Log log = LogFactory.getLog(getClass());
+
+    @Autowired
+    public JpaWizardRepository(EntityManagerFactory entityManagerFactory)
+    {
+        setEntityManagerFactory(entityManagerFactory);
+    }
+
+    @Override
+    public Wizard get(Long wizardId)
+    {
+        log.debug("get(wizardId=" + wizardId + ")");
+        Wizard wizard = getJpaTemplate().find(Wizard.class, wizardId);
+        if (wizard == null) {
+            throw new IncorrectResultSizeDataAccessException("Wizard with id '" + wizardId + "' was not found.", 1);
+        }
+
+        return wizard;
+    }    
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public Wizard find(String name)
+    {
+        log.debug("find(name=" + name + ")");
+
+        // build params map
+        HashMap<String, Object> params = new HashMap<String,Object>();
+        params.put("name", name);
+
+        List<Wizard> list = getJpaTemplate().findByNamedQueryAndNamedParams("Wizard.findByName", params);
+        return (list.isEmpty() ? null : list.get(0));
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public List<Wizard> findAll()
+    {
+        log.debug("findAll()");
+        return getJpaTemplate().findByNamedQuery("Wizard.findAll");
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/impl/JpaWizardRepository.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaConstants.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaConstants.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaConstants.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaConstants.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.mitre.portal.repository.util;
+
+/**
+ * This class containts constants used in the JPA layer
+ *
+ * @author ACARLUCCI
+ */
+public final class JpaConstants
+{
+
+    /**
+     * Names of the database constraints
+     */
+    public class Constraint {
+        public static final String UNIQUE_PAGE_NAME = "CONTAINER_PAGE_NAME_UNQ";
+        public static final String UNIQUE_GADGET_URL = "GADGET_URL_UNQ";
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaConstants.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaUtils.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaUtils.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaUtils.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaUtils.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,49 @@
+/*
+ * 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.repository.util;
+
+import org.springframework.orm.jpa.JpaTemplate;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class JpaUtils 
+{
+    /**
+     * Deletes a JPA entity.  If the object passed in is not currently managed
+     * in the context it will obtain it first before performing the delete.
+     *
+     * @param jpaTemplate
+     * @param obj
+     */
+    public static void managedDelete(JpaTemplate jpaTemplate, Object obj) {
+        if (jpaTemplate == null)
+            throw new IllegalArgumentException("jpaTemplate can't be null");
+
+        if (obj == null)
+            throw new IllegalArgumentException("object can't be null");
+
+        jpaTemplate.remove(jpaTemplate.contains(obj) ? obj : jpaTemplate.merge(obj));
+    }
+
+
+
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/repository/util/JpaUtils.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityTokenService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityTokenService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityTokenService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityTokenService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.mitre.portal.security;
+
+import org.mitre.portal.model.PersonGadget;
+import org.mitre.portal.service.exception.SecurityTokenException;
+import org.apache.shindig.auth.SecurityToken;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: MFRANKLIN
+ * Date: Sep 23, 2009
+ * Time: 10:30:16 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface SecurityTokenService {
+    public String getEncryptedEncodedSecurityToken(PersonGadget gadget) throws SecurityTokenException;
+    public SecurityToken getSecurityTokenFromEncodedEncryptedSecurityToken(String encodedEncryptedSecurityToken) throws SecurityTokenException;
+    public String refreshEncodedEncryptedSecurityToken(String encodedEncryptedSecurityToken) throws SecurityTokenException;
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityTokenService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityUtil.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityUtil.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityUtil.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityUtil.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,48 @@
+/*
+ * 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.security;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.GrantedAuthorityImpl;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class SecurityUtil {
+    /**
+     * Utility function to create a list of GrantedAuthority objects from
+     * a String array of role names
+     *
+     * @param roleNames String array of role names to be converted into corresponding GrantedAuthority objects     *
+     * @return List of GrantedAuthority objects
+     */
+    public static List<GrantedAuthority> convert(String[] roleNames) {
+        List<GrantedAuthority> list = new ArrayList<GrantedAuthority>();
+        if (roleNames != null) {
+            for (int i=0; i < roleNames.length; i++) {
+                list.add(new GrantedAuthorityImpl(roleNames[i]));
+            }
+        }
+        return list;
+    }
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/SecurityUtil.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/UserService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/UserService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/UserService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/UserService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,57 @@
+/*
+ * 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.security;
+
+import org.mitre.portal.model.Person;
+import org.springframework.security.core.userdetails.UserDetailsService;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: MFRANKLIN
+ * Date: Sep 23, 2009
+ * Time: 11:48:32 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface UserService extends UserDetailsService {
+    /**
+     * Gets the current authenticated user.
+     *
+     * @return the current authenticated user.
+     * @throws SecurityException if there is no current logged in user.
+     */
+    public Person getCurrentAuthenticatedUser();
+
+    /**
+     * Sets the current authenticated user to that of the userId passed in.  The clearCurrentAuthenticatedUser
+     * method should be called as soon as possible after invoking this method if the authentication is only needed
+     * temporarily.
+     * <p/>
+     * THIS METHOD SHOULD ONLY BE USED FOR VERY SPECIALIZED NEEDS.  GENERALLY THE LOGGED IN USER SHOULD BE THE USER WHO
+     * HAS AUTHENTICATED TO THE WEB APPLICATION AND SHOULD NOT BE ALTERED.
+     *
+     * @param userId the userId of the user to set the current authenticated user to.
+     */
+    public void setCurrentAuthenticatedUser(String userId);
+
+    /**
+     * Clears the currently authenticated user.
+     */
+    public void clearCurrentAuthenticatedUser();
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/UserService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/DefaultUserService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/DefaultUserService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/DefaultUserService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/DefaultUserService.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.security.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.model.SecurityUserRole;
+import org.mitre.portal.repository.SecurityUserRoleRepository;
+import org.mitre.portal.security.UserService;
+import org.mitre.portal.service.PersonService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.dao.DataAccessException;
+import org.springframework.security.authentication.AbstractAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.GrantedAuthorityImpl;
+import org.springframework.security.core.context.SecurityContext;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.context.SecurityContextImpl;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @author acarlucci
+ */
+@Service(value = "userService")
+public class DefaultUserService implements UserService {
+    protected final Log log = LogFactory.getLog(getClass());
+
+    private PersonService personService;
+    private SecurityUserRoleRepository securityUserRoleRepository;
+
+    @Autowired
+    public DefaultUserService(PersonService personService, SecurityUserRoleRepository securityUserRoleRepository) {
+        this.personService = personService;
+        this.securityUserRoleRepository = securityUserRoleRepository;
+    }
+
+    @Override
+    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
+        log.debug("loadUserByUsername called with: " + username);
+
+        Person person = personService.getPersonByUsername(username);
+        if (person == null) {
+            throw new UsernameNotFoundException("User with username '" + username + "' was not found!");
+        }
+
+        // load application security roles
+        loadGrantedAuthorities(person);
+     
+        return person;
+    }
+
+    @Override
+    public Person getCurrentAuthenticatedUser() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        
+        if (authentication != null && authentication.getPrincipal() instanceof Person) {
+            return (Person) authentication.getPrincipal();
+        } else {
+            throw new SecurityException("Could not get the authenticated user!");
+        }
+    }
+
+    @Override
+    public void setCurrentAuthenticatedUser(String userId) {
+        final Person person = personService.getPersonByUserId(userId);
+        loadGrantedAuthorities(person);
+        SecurityContext securityContext = new SecurityContextImpl();
+        securityContext.setAuthentication(new AbstractAuthenticationToken(person.getAuthorities()) {
+            @Override
+            public Object getCredentials() {
+                return "N/A";
+            }
+
+            @Override
+            public Object getPrincipal() {
+                return person;
+            }
+
+            @Override
+            public boolean isAuthenticated() {
+                return true;
+            }
+        });
+        SecurityContextHolder.setContext(securityContext);
+    }
+
+    @Override
+    public void clearCurrentAuthenticatedUser() {
+        SecurityContextHolder.clearContext();
+    }
+
+    private void loadGrantedAuthorities(Person person) {
+        if (person == null) return;
+
+        Collection<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>();
+        List<SecurityUserRole> securityUserRoles = securityUserRoleRepository.find(person.getUserId());
+        for (SecurityUserRole sur : securityUserRoles) {
+            grantedAuthorities.add(new GrantedAuthorityImpl(sur.getSecurityRoleName()));
+        }
+
+        person.setAuthorities(grantedAuthorities);
+    }
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/DefaultUserService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/EncryptedBlobSecurityTokenService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/EncryptedBlobSecurityTokenService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/EncryptedBlobSecurityTokenService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/EncryptedBlobSecurityTokenService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,154 @@
+/*
+ * 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.security.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.shindig.auth.BlobCrypterSecurityToken;
+import org.apache.shindig.auth.PortalBlobCrypterSecurityToken;
+import org.apache.shindig.auth.SecurityToken;
+import org.apache.shindig.common.crypto.BasicBlobCrypter;
+import org.apache.shindig.common.crypto.BlobCrypter;
+import org.apache.shindig.common.util.CharsetUtil;
+import org.mitre.portal.model.Gadget;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.model.PersonGadget;
+import org.mitre.portal.security.SecurityTokenService;
+import org.mitre.portal.security.UserService;
+import org.mitre.portal.service.exception.SecurityTokenException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Service;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.ResourceBundle;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: MFRANKLIN
+ * Date: Sep 23, 2009
+ * Time: 10:30:48 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Service(value = "securityTokenService")
+public class EncryptedBlobSecurityTokenService implements SecurityTokenService {
+    private static final Log log = LogFactory.getLog(EncryptedBlobSecurityTokenService.class);
+
+    private static final String SECURITY_PROPERTIES = "application";
+    private static final String ENCRYPTION_PROPERTY = "security.encryptionkey";
+    private static final String EMBEDDED_KEY_PREFIX = "embedded:";
+    // TODO - should this be read in from a properties file?
+    private static final String CONTAINER = "default";
+    private static final String DOMAIN = "default";
+    private static final String CHAR_ENCODING = "UTF-8";
+
+    private final UserService userService;
+    private final BlobCrypter blobCrypter;
+
+    @Autowired
+    public EncryptedBlobSecurityTokenService(UserService userService) {
+        this.userService = userService;
+
+        ResourceBundle resourceBundle = ResourceBundle.getBundle(SECURITY_PROPERTIES);
+        if (resourceBundle.containsKey(ENCRYPTION_PROPERTY)) {
+            String key = resourceBundle.getString(ENCRYPTION_PROPERTY);
+            if (key.startsWith(EMBEDDED_KEY_PREFIX)) {
+                byte[] encryptionKey = CharsetUtil.getUtf8Bytes(key.substring(EMBEDDED_KEY_PREFIX.length()));
+                this.blobCrypter = new BasicBlobCrypter(encryptionKey);
+            } else {
+                try {
+                    this.blobCrypter = new BasicBlobCrypter(new File(key));
+                } catch (IOException e) {
+                    throw new SecurityException("Unable to load encryption key from file: " + key);
+                }
+            }
+        } else {
+            throw new SecurityException("Unable to find encryption key!");
+        }
+    }
+
+    @Override
+    @PreAuthorize("#personGadget.userId == principal.userId")
+    public String getEncryptedEncodedSecurityToken(PersonGadget personGadget) throws SecurityTokenException {
+        Person user = userService.getCurrentAuthenticatedUser();
+        String userId = user.getUserId();
+        String encryptedToken = null;
+
+        try {
+            BlobCrypterSecurityToken securityToken = new BlobCrypterSecurityToken(blobCrypter, CONTAINER, DOMAIN);
+
+            securityToken.setAppUrl(personGadget.getGadget().getUrl().toString());
+            securityToken.setModuleId(personGadget.getPersonGadgetId());
+            securityToken.setOwnerId(personGadget.getUserId());
+            securityToken.setViewerId(userId);
+            securityToken.setTrustedJson("");
+
+            encryptedToken = URLEncoder.encode(securityToken.encrypt(), CHAR_ENCODING);
+            log.debug("Token created for personGadget " + personGadget.toString() + " and user " + user.toString() + " -- encrypted token is: " + encryptedToken);
+        }
+        catch (Exception e) {
+            throw new SecurityTokenException("Error creating security token from person gadget", e);
+        }
+
+        return encryptedToken;
+    }
+
+    @Override
+    public SecurityToken getSecurityTokenFromEncodedEncryptedSecurityToken(String encodedEncryptedSecurityToken) throws SecurityTokenException {
+        SecurityToken token;
+
+        try {
+            //log.debug("decrypting security token: " + encodedEncryptedSecurityToken);
+
+            // first decode
+            String unencodedEncryptedSecurityToken = URLDecoder.decode(encodedEncryptedSecurityToken, "UTF-8");
+            // remove the header container string and :
+            unencodedEncryptedSecurityToken = unencodedEncryptedSecurityToken.substring((CONTAINER + ":").length());
+            // decrypt
+            token = PortalBlobCrypterSecurityToken.decrypt(blobCrypter, CONTAINER, DOMAIN, unencodedEncryptedSecurityToken);
+        } catch (Exception e) {
+            throw new SecurityTokenException("Error creating security token from encodedEncryptedSecurityToken", e);
+        }
+
+        return token;
+    }
+
+    @Override
+    public String refreshEncodedEncryptedSecurityToken(String encodedEncryptedSecurityToken) throws SecurityTokenException {
+        try {
+            //Decrypt the current token
+            SecurityToken securityToken = getSecurityTokenFromEncodedEncryptedSecurityToken(encodedEncryptedSecurityToken);
+
+            //Create a new PersonGadget instance from it so we can use it to generate a new encrypted token
+            PersonGadget personGadget = new PersonGadget(securityToken.getModuleId(), securityToken.getOwnerId());
+            personGadget.setGadget(new Gadget(-1L, "", "", new URL(securityToken.getAppUrl())));
+
+            //Create and return the newly encrypted token
+            return getEncryptedEncodedSecurityToken(personGadget);
+        } catch (MalformedURLException e) {
+            throw new SecurityTokenException(e.getMessage(), e);
+        }
+    }
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/security/impl/EncryptedBlobSecurityTokenService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ContainerService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ContainerService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ContainerService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ContainerService.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.service;
+
+import java.net.URL;
+import java.util.List;
+
+import org.mitre.portal.model.*;
+import org.mitre.portal.service.exception.ContainerNotFoundException;
+import org.mitre.portal.service.exception.ContainerRegistryNotFoundException;
+import org.mitre.portal.service.exception.GadgetAudienceNotFoundException;
+import org.mitre.portal.service.exception.GadgetException;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public interface ContainerService {
+    // container methods
+    public Container getContainer(Long containerId) throws ContainerNotFoundException;
+    public Container findContainer(String name);
+    public List<Container> getAll();
+    public void saveContainer(Container container);
+
+    // container registry methods
+    public ContainerRegistry getContainerRegistry(Long containerRegistryId) throws ContainerRegistryNotFoundException;
+    public ContainerRegistry findContainerRegistry(Container container, Gadget gadget);
+    public ContainerRegistry findContainerRegistry(Container container, URL gadgetUrl);
+    public List<ContainerRegistry> findContainerRegistry(Container container);
+    public List<ContainerRegistry> findByAuthor(Container container, String authorName);
+    public List<ContainerRegistry> findByAuthorUserId(Container container, String authorUserId);
+    public List<ContainerRegistry> findByGadgetAuthorType(Container container, GadgetAuthorType gadgetAuthorType);
+    public List<ContainerRegistry> findByGadgetTitleOrDesc(Container container, String queryString);
+    public List<ContainerRegistry> findByTagName(Container container, String tagName);
+    public List<ContainerRegistry> findByAudience(Container container, GadgetAudience gadgetAudience);
+    public List<ContainerRegistry> findByGadgetId(Container container, Long gadgetId);
+
+    public List<GadgetAudience> findAllGadgetAudience();
+    public List<String> findAllGadgetTags();
+
+    public void registerNewGadget(Gadget gadget, Container container) throws GadgetException, GadgetAudienceNotFoundException;
+    public void delete(ContainerRegistry containerRegistry);
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ContainerService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/EmailService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/EmailService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/EmailService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/EmailService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,33 @@
+/*
+ * 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.service;
+
+import javax.mail.MessagingException;
+import org.mitre.portal.model.GadgetComment;
+import org.mitre.portal.model.Person;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public interface EmailService {
+    //TODO: Consider removing application URL parameters and pulling them via configuration instead from within the implementations
+    public void sendGadgetCommentNotification(GadgetComment gadgetComment, Person user, boolean isUpdatedComment, String applicationHostname, int applicationPort, String applicationContextPath) throws MessagingException;
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/EmailService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/GadgetService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/GadgetService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/GadgetService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/GadgetService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,104 @@
+/*
+ * 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.service;
+
+import org.mitre.portal.model.*;
+
+import java.net.URL;
+import java.util.List;
+
+import org.apache.shindig.auth.SecurityToken;
+import org.mitre.portal.model.Container;
+import org.mitre.portal.model.Gadget;
+import org.mitre.portal.model.GadgetAudience;
+import org.mitre.portal.model.GadgetAuthorType;
+import org.mitre.portal.model.GadgetComment;
+import org.mitre.portal.model.GadgetRating;
+import org.mitre.portal.model.GadgetSupportLinkType;
+import org.mitre.portal.model.GadgetUserPref;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.model.PersonGadget;
+import org.mitre.portal.service.exception.GadgetAudienceNotFoundException;
+import org.mitre.portal.service.exception.GadgetCommentNotFoundException;
+import org.mitre.portal.service.exception.GadgetNotFoundException;
+import org.mitre.portal.service.exception.GadgetUserPrefNotFoundException;
+import org.mitre.portal.service.exception.PersonGadgetNotFoundException;
+import org.mitre.portal.service.exception.SecurityTokenException;
+import org.mitre.portal.service.exception.UnknownGadgetException;
+
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public interface GadgetService {
+    // Gadget methods
+    public Gadget getGadget(Long gadgetId) throws GadgetNotFoundException;
+    public Gadget findGadgetFromUrl(URL gadgetUrl, Container container);
+    public void save(Gadget gadget) throws GadgetAudienceNotFoundException, UnknownGadgetException;
+    public void delete(Gadget gadget);
+    public void updateUserPrefMetaData(Gadget existingGadget, Gadget updatedGadget);
+
+    // Gadget rating methods
+    public GadgetRating getGadgetRating(Long gadgetId) throws GadgetNotFoundException, GadgetUserPrefNotFoundException;
+    public GadgetRating getUserGadgetRating(Gadget gadget, String userId) throws GadgetUserPrefNotFoundException;
+    public List<GadgetRating> getGadgetRatings(Gadget gadget);
+    public List<GadgetRating> getGadgetRatings(String userId);
+    public void save(GadgetRating rating);
+
+    // returns a GadgetAudience based on pk
+    public GadgetAudience getGadgetAudience(Long gadgetAudienceId) throws GadgetAudienceNotFoundException;
+    public void save(GadgetAudience gadgetAudience);
+    public void delete(GadgetAudience gadgetAudience);
+    
+    // GadgetUserPref methods
+    public GadgetUserPref getGadgetUserPref(Long gadgetUserPrefId) throws GadgetUserPrefNotFoundException;
+    public List<GadgetUserPref> findGadgetUserPrefs(Gadget gadget);
+
+    // PersonGadget methods
+    public PersonGadget getPersonGadget(Long personGadgetId) throws PersonGadgetNotFoundException, SecurityTokenException;
+    public PersonGadget getPersonGadget(SecurityToken securityToken) throws PersonGadgetNotFoundException, SecurityTokenException;
+    public List<PersonGadget> findPersonGadgets(Person user);
+
+    // GadgetSupportLinkType methods
+    public List<GadgetSupportLinkType> getAllSupportLinkTypes();
+
+    // GadgetAuthorType methods
+    public List<GadgetAuthorType> getAllAuthorTypes();
+
+    // GadgetAudience methods
+    public List<GadgetAudience> getAllAudiences();
+    public List<GadgetAudience> getAllAudiencesAssignedToGadgets();
+
+    // GadgetComment methods
+    public GadgetComment getGadgetComment(Long gadgetCommentId) throws GadgetCommentNotFoundException;
+    public List<GadgetComment> findGadgetCommentsByGadget(Gadget gadget);
+    public void save(GadgetComment gadgetComment);
+    public void saveAsAdmin(GadgetComment gadgetComment);
+    public void delete(GadgetComment gadgetComment);
+
+    // SecurityRole methods
+    public List<SecurityRole> getAllSecurityRoles();
+
+    // SecurityUserRole methods
+    public List<SecurityUserRole> getAllSecurityUserRoleByUserId( String userId);
+    public void save(SecurityUserRole securityUserRole);
+    public void delete(SecurityUserRole securityUserRole);
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/GadgetService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/MetricsLoggingService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/MetricsLoggingService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/MetricsLoggingService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/MetricsLoggingService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,46 @@
+/*
+ * 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.service;
+
+import org.mitre.portal.model.Gadget;
+import org.mitre.portal.model.Page;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.service.util.MetricsLoggingKeys;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public interface MetricsLoggingService {
+    /**
+     * Logs an entry to the metrics.log file for a particular gadget action
+     * 
+     * @param action The MetricsLoggingKeys.GadgetActions enum value representing the action performed
+     * @param user The user performing the action
+     * @param gadget The gadget which is part of the action     
+     * @param toPage The Page object of which a gadget is being added or moved to. 
+     *               It should be null for delete actions.
+     * @param fromPage The Page object where the gadget is being moved or deleted from.
+     *                 It should be null for add actions.
+     * @return the string that gets logged to the metrics.log file, usefully 
+     *         mainly for testing purposes
+     */
+    String logGadgetAction(MetricsLoggingKeys.GadgetActions action, Person user, Gadget gadget, Page toPage, Page fromPage);
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/MetricsLoggingService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PageService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PageService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PageService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PageService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,130 @@
+/*
+ * 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.service;
+
+import java.util.List;
+import org.mitre.portal.model.Container;
+import org.mitre.portal.model.Gadget;
+import org.mitre.portal.model.Page;
+import org.mitre.portal.model.PageLayout;
+import org.mitre.portal.model.PageTemplate;
+import org.mitre.portal.model.PageTemplateOwnerType;
+import org.mitre.portal.model.Person;
+import org.mitre.portal.model.PersonGadget;
+import org.mitre.portal.model.Region;
+import org.mitre.portal.model.RegionGadget;
+import org.mitre.portal.service.exception.PageException;
+import org.mitre.portal.service.exception.PageLayoutNotFoundException;
+import org.mitre.portal.service.exception.PageNotFoundException;
+import org.mitre.portal.service.exception.PageTemplateNotFoundException;
+import org.mitre.portal.service.exception.PageTemplateOwnerTypeNotFoundException;
+import org.mitre.portal.service.exception.RegionGadgetNotFoundException;
+import org.mitre.portal.service.exception.RegionNotFoundException;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public interface PageService {
+    /****************
+     * Page methods
+     ****************/
+    // returns a page based on pk
+    public Page getPage(Long pageId) throws PageNotFoundException;
+    // retuns a page in a given container for a given user
+    public Page findPage(Container container, String pageName, Person user);
+    public Page findDefaultPage(Container container, Person user);
+    // returns all pages for a user in a container
+    public List<Page> findPages(Container container, Person user);
+    public void save(Page page) throws PageException;
+    public void delete(Page page);
+    // adds a gadget to a page, location determined by implementation
+    public void add(Gadget gadget, Page page);
+    // moves a regiongadget to a new region in the same page
+    public void move(RegionGadget regionGadget, Long toRegionId, int toRenderSequence);
+    //move a regionGadget to a new page
+    public void move(RegionGadget regionGadget, Region toRegion, int toRenderSequence);
+    
+
+    /**
+     * re-calculates the render sequence values based on their index position
+     * in the list.  render sequence values are 1-based indexed
+     * 
+     * @param pages
+     */
+    public void updatePageRenderSequences(List<Page> pages);
+
+    /**
+     * Updates a page's layout and re-orders gadgets if necessary.  This method
+     * does not persist to the database it only modifies the model object.
+     * 
+     * @param page
+     * @param newPageLayout
+     */
+    public void updatePageLayout(Page page, PageLayout newPageLayout);
+
+    /****************
+     * Region methods
+     ****************/
+    public Region getRegion(Long regionId) throws RegionNotFoundException;
+    public Region findRegion(String regionName, Page page);
+    public List<Region> findRegions(Page page);
+    public void add(Gadget gadget, Region region, Region.Location location);
+    public void save(Region region);
+    public void delete(RegionGadget regionGadget);
+
+    /***********************
+     * RegionGadget methods
+     ***********************/
+    public RegionGadget getRegionGadget(Long regionGadgetId) throws RegionGadgetNotFoundException;
+    public List<RegionGadget> findRegionGadgets(Region region);
+    // moves a region gadget to a new sequence position in the same region
+    public void move(RegionGadget regionGadget, int newRenderSequence);
+    public void save(RegionGadget regionGadget);
+
+    /************************
+     * PersonGadget methods *
+     ************************/
+    public void save(PersonGadget personGadget);
+
+    /***********************
+     * PageLayout methods
+     ***********************/
+    public PageLayout getPageLayout(Long pageLayoutId) throws PageLayoutNotFoundException;
+    public List<PageLayout> getAllPageLayouts();
+    public List<PageLayout> getAllUserSelectablePageLayouts();
+
+    /***************************
+     * PageTemplateOwnerType methods
+     ***************************/
+    public PageTemplateOwnerType getPageTemplateOwnerType(String code) throws PageTemplateOwnerTypeNotFoundException;
+    public List<PageTemplateOwnerType> getAllPageTemplateOwnerTypes();
+    
+    /***************************
+     * PageTemplate methods
+     ***************************/
+    public PageTemplate getPageTemplate(Long pageTemplateId) throws PageTemplateNotFoundException;
+    public List<PageTemplate> getAllPageTemplates();
+    public PageTemplate getDefaultPageTemplate() throws PageTemplateNotFoundException;
+    public PageTemplate find(Container container, String name);
+    public List<PageTemplate> find(Container container, PageTemplateOwnerType pageTemplateOwnerType);
+    // conversion
+    public Page convert(PageTemplate pageTemplate, Person user);
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PageService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PersonService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PersonService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PersonService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PersonService.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.service;
+
+import org.mitre.portal.model.Person;
+
+public interface PersonService {
+    /**
+     * @param userId
+     * @return
+     */
+    Person getPersonByUserId(String userId);
+
+    /**
+     * @param username
+     * @return
+     */
+    Person getPersonByUsername(String username);
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/PersonService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ShindigService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ShindigService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ShindigService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ShindigService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,40 @@
+/*
+ * 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.service;
+
+import java.net.URL;
+import org.mitre.portal.model.Container;
+
+/**
+ * Service Interface for interacting directly with the shindig server
+ *
+ * @author ACARLUCCI
+ */
+public interface ShindigService {
+
+    /**
+     * Call Shindig's metadata service to retrieve a gadget's metadata
+     * 
+     * @param gadgetUrl The url of the gadget you want to retrieve metadata from
+     * @param container 
+     * @return
+     */
+    public String invokeShindigMetadataPost(URL gadgetUrl, Container container);
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/ShindigService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/StatisticsService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/StatisticsService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/StatisticsService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/StatisticsService.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.service;
+
+import java.util.List;
+import java.util.Map;
+import org.mitre.portal.model.ContainerRegistry;
+import org.mitre.portal.model.util.GadgetStatistics;
+
+
+/**
+ *
+ * @author Sean Cooper
+ */
+public interface StatisticsService {
+
+    public Map<String, GadgetStatistics> getAllGadgetStatistics(List<ContainerRegistry> containerRegistryList);
+    public Map<String, GadgetStatistics> getAllGadgetStatistics(final String userId, List<ContainerRegistry> containerRegistryList);
+    public GadgetStatistics getGadgetStatistics(final Long gadgetId);
+    public GadgetStatistics getGadgetStatistics(final Long gadgetId, final String userId);
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/StatisticsService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/WizardService.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/WizardService.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/WizardService.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/WizardService.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,40 @@
+/*
+ * 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.service;
+
+import java.util.List;
+
+import org.mitre.portal.model.*;
+import org.mitre.portal.service.exception.WizardNotFoundException;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public interface WizardService {
+
+    // Wizard methods
+    public Wizard getWizard(Long wizardId) throws WizardNotFoundException;
+    public Wizard findWizard(String name);
+    public List<Wizard> findAllWizards();
+    public List<Wizard> findNonCompletedWizardsByUser(Person user);
+    public void save(UserWizardCompleted userWizardCompleted);
+    public void delete(UserWizardCompleted userWizardCompleted);
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/WizardService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,55 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public abstract class ContainerException extends Exception
+{
+    protected Long containerId;
+    protected String containerName;
+    
+    /**
+     * Creates a new page exception
+     * @param message the message
+     */
+    public ContainerException(String message) {
+        super(message);
+    }
+
+    /**
+     * Creates a new page exception
+     * @param message the message
+     * @param cause the cause
+     */
+    public ContainerException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public Long getContainerId() {
+        return containerId;
+    }
+
+    public String getContainerName() {
+        return containerName;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerNotFoundException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerNotFoundException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerNotFoundException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,32 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class ContainerNotFoundException extends ContainerException
+{
+    public ContainerNotFoundException(Long containerId) {
+        super("containerId " + containerId + " not found");
+        this.containerId = containerId;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerNotFoundException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryException.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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public abstract class ContainerRegistryException extends Exception
+{
+    protected Long containerRegistryId;
+    protected Long containerId;
+    protected Long gadgetId;
+    
+    public ContainerRegistryException(String message) {
+        super(message);
+    }
+
+    public ContainerRegistryException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public Long getContainerRegistryId() {
+        return containerRegistryId;
+    }
+
+    public Long getContainerId() {
+        return containerId;
+    }
+
+    public Long getGadgetId() {
+        return gadgetId;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryNotFoundException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryNotFoundException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryNotFoundException.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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class ContainerRegistryNotFoundException extends ContainerRegistryException
+{
+    public ContainerRegistryNotFoundException(Long containerRegistryId) {
+        super("containerRegistryId " + containerRegistryId + " not found");
+        this.containerRegistryId = containerRegistryId;
+    }
+
+    public ContainerRegistryNotFoundException(Long containerId, Long gadgetId) {
+        super("containerRegistry not found for - containerId: " + containerId + " / gadgetId: " + gadgetId);
+        this.gadgetId = gadgetId;
+        this.containerId = containerId;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/ContainerRegistryNotFoundException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicateGadgetUrlException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicateGadgetUrlException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicateGadgetUrlException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicateGadgetUrlException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,32 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class DuplicateGadgetUrlException extends GadgetException
+{
+    public DuplicateGadgetUrlException(String gadgetUrl) {
+        super("Gadget URL '" + gadgetUrl + "' has already been registered");
+        this.gadgetUrl = gadgetUrl;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicateGadgetUrlException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicatePageNameException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicatePageNameException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicatePageNameException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicatePageNameException.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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class DuplicatePageNameException extends PageException
+{
+    /**
+     * Creates a new duplicate page name exception
+     * @param pageName the page name which already exists
+     * @param userId the user
+     */
+    public DuplicatePageNameException(String pageName, String userId) {
+        super("Page name '" + pageName + "' already exists for " + userId);
+        this.pageName = pageName;
+        this.userId = userId;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/DuplicatePageNameException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetAudienceNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetAudienceNotFoundException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetAudienceNotFoundException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetAudienceNotFoundException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,44 @@
+/*
+ * 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.service.exception;
+
+public class GadgetAudienceNotFoundException extends Exception
+{
+    protected Long gadgetAudienceId;
+
+    public GadgetAudienceNotFoundException(String message) {
+        super(message);
+    }
+
+    public GadgetAudienceNotFoundException(Long gadgetAudienceId) {
+        super("gadgetAudienceId " + gadgetAudienceId + " not found");
+        this.gadgetAudienceId = gadgetAudienceId;
+    }
+	
+    public GadgetAudienceNotFoundException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public Long getGadgetAudienceId() {
+        return gadgetAudienceId;
+    }
+    
+	
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetAudienceNotFoundException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,41 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public abstract class GadgetCommentException extends Exception
+{
+    protected Long gadgetCommentId;
+
+    public GadgetCommentException(String message) {
+        super(message);
+    }
+
+    public GadgetCommentException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public Long getGadgetCommentId() {
+        return gadgetCommentId;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentNotFoundException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentNotFoundException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentNotFoundException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,32 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class GadgetCommentNotFoundException extends GadgetCommentException
+{
+    public GadgetCommentNotFoundException(Long gadgetCommentId) {
+        super("gadgetCommentId " + gadgetCommentId + " not found");
+        this.gadgetCommentId = gadgetCommentId;
+    }   
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetCommentNotFoundException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,55 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public abstract class GadgetException extends Exception
+{
+    protected Long gadgetId;
+    protected String gadgetUrl;
+
+    /**
+     * Creates a new gadget exception
+     * @param message the message
+     */
+    public GadgetException(String message) {
+        super(message);
+    }
+
+    /**
+     * Creates a new gagdet exception
+     * @param message the message
+     * @param cause the cause
+     */
+    public GadgetException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public Long getGadgetId() {
+        return gadgetId;
+    }
+
+    public String getGadgetUrl() {
+        return gadgetUrl;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetNotFoundException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetNotFoundException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetNotFoundException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,41 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class GadgetNotFoundException extends GadgetException
+{
+    /**
+     * Creates a new gadget not found exception
+     * @param gadgetId the gadget id
+     */
+    public GadgetNotFoundException(Long gadgetId) {
+        super("gadgetId " + gadgetId + " not found");
+        this.gadgetId = gadgetId;
+    }
+
+    public GadgetNotFoundException(String gadgetUrl) {
+        super("gadget not found at " + gadgetUrl);
+        this.gadgetUrl = gadgetUrl;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetNotFoundException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,46 @@
+/*
+ * 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.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public abstract class GadgetUserPrefException extends Exception
+{
+    protected Long gadgetUserPrefId;
+    protected String gadgetUserPrefName;
+
+    public GadgetUserPrefException(String message) {
+        super(message);
+    }
+
+    public GadgetUserPrefException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public Long getGadgetUserPrefId() {
+        return gadgetUserPrefId;
+    }
+
+    public String getGadgetUserPrefName() {
+        return gadgetUserPrefName;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefException.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefNotFoundException.java?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefNotFoundException.java (added)
+++ incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefNotFoundException.java Fri Apr  1 16:42:22 2011
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.mitre.portal.service.exception;
+
+/**
+ *
+ * @author ACARLUCCI
+ */
+public class GadgetUserPrefNotFoundException extends GadgetUserPrefException
+{
+    public GadgetUserPrefNotFoundException(Long gadgetUserPrefId) {
+        super("gadgetUserPrefId " + gadgetUserPrefId + " not found");
+        this.gadgetUserPrefId = gadgetUserPrefId;
+    }
+
+    public GadgetUserPrefNotFoundException(String gadgetUserPrefName) {
+        super("gadgetUserPrefName " + gadgetUserPrefName + " not found");
+        this.gadgetUserPrefName = gadgetUserPrefName;
+    }
+}

Propchange: incubator/rave/donations/mitre-osec/src/org/mitre/portal/service/exception/GadgetUserPrefNotFoundException.java
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message