Examples of KeyedMessage


Examples of org.apache.jetspeed.i18n.KeyedMessage

            }
            getPersistenceBrokerTemplate().store(internalRole);
        }
        catch (Exception e)
        {
            KeyedMessage msg = SecurityException.UNEXPECTED.create("SecurityAccess.setInternalRolePrincipal",
                                                                   "store",
                                                                   e.getMessage());
            logger.error(msg, e);
            throw new SecurityException(msg, e);
        }
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

            }

        }
        catch (Exception e)
        {
            KeyedMessage msg = SecurityException.UNEXPECTED.create("SecurityAccess.removeInternalRolePrincipal",
                                                                   "store",
                                                                   e.getMessage());
            logger.error(msg, e);
            throw new SecurityException(msg, e);
        }
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

            }
            getPersistenceBrokerTemplate().store(internalGroup);
        }
        catch (Exception e)
        {
            KeyedMessage msg = SecurityException.UNEXPECTED.create("SecurityAccess.setInternalGroupPrincipal",
                                                                   "store",
                                                                   e.getMessage());
            logger.error(msg, e);        
            throw new SecurityException(msg, e);
        }
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

            }

        }
        catch (Exception e)
        {
            KeyedMessage msg = SecurityException.UNEXPECTED.create("SecurityAccess.removeInternalGroupPrincipal",
                                                                   "store",
                                                                   e.getMessage());
            logger.error(msg, e);
            throw new SecurityException(msg, e);
        }
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

      String oldCredential = (String)env.get(Context.SECURITY_CREDENTIALS);
      String oldUsername = (String)env.get(Context.SECURITY_PRINCIPAL);
           
      String dn = lookupByUid(uid);
            if ( dn == null )
        throw new SecurityException(new KeyedMessage("User " + uid + " not found"));
           
            // Build user dn using lookup value, just appending the user filter after the uid won't work when users
            // are/can be stored in a subtree (searchScope sub-tree)
            // The looked up dn though is/should always be correct, just need to append the root context.
            if (!StringUtils.isEmpty(getRootContext()))
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

            } catch (SecurityException se)
            {
                throw se;
            } catch (Exception e)
            {
                KeyedMessage msg =
                    SecurityException.UNEXPECTED.create("GroupManager.removeGroup",
                                                        "GroupSecurityHandler.removeGroupPrincipal("+
                        GroupPrincipalImpl.getPrincipalNameFromFullPath(groups[i])+")",
                        e.getMessage());
                log.error(msg, e);
                throw new SecurityException(msg, e);
            }
            // Remove preferences
            Preferences groupPref = Preferences.userRoot().node(
                    groups[i]);
            try
            {
                groupPref.removeNode();
            } catch (BackingStoreException bse)
            {
                KeyedMessage msg =
                    SecurityException.UNEXPECTED.create("Preferences.removeNode("+groups[i]+")",
                                                        bse.getMessage());
                log.error(msg, bse);
                throw new SecurityException(msg, bse);
            }
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

      String oldCredential = (String)env.get(Context.SECURITY_CREDENTIALS);
      String oldUsername = (String)env.get(Context.SECURITY_PRINCIPAL);
           
      String dn = lookupByUid(uid);
            if ( dn == null )
        throw new SecurityException(new KeyedMessage("User " + uid + " not found"));
           
            // Build user dn using lookup value, just appending the user filter after the uid won't work when users
            // are/can be stored in a subtree (searchScope sub-tree)
            // The looked up dn though is/should always be correct, just need to append the root context.
            if (!StringUtils.isEmpty(getRootContext()))
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

                }
            }
        }
        catch (SecurityException se)
        {
            KeyedMessage msg =
                SecurityException.UNEXPECTED.create("RoleManager.addRole",
                                                    "RoleSecurityHandler.setRolePrincipal("+rolePrincipal.getName()+")",
                                                    se.getMessage());
            log.error(msg, se);
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

                roleSecurityHandler.removeRolePrincipal(new RolePrincipalImpl(RolePrincipalImpl
                        .getPrincipalNameFromFullPath((String) roles[i])));
            }
            catch (Exception e)
            {
                KeyedMessage msg =
                    SecurityException.UNEXPECTED.create("RoleManager.removeRole",
                                                        "RoleSecurityHandler.removeRolePrincipal("+RolePrincipalImpl.getPrincipalNameFromFullPath((String) roles[i])+")",
                                                        e.getMessage());
                log.error(msg, e);
                throw new SecurityException(msg, e);
            }
            // Remove preferences
            Preferences rolePref = Preferences.userRoot().node((String) roles[i]);
            try
            {
                rolePref.removeNode();
            }
            catch (BackingStoreException bse)
            {
                KeyedMessage msg =
                    SecurityException.UNEXPECTED.create("RoleManager.removeRole",
                                                        "Preferences.removeNode("+roles[i]+")",
                                                        bse.getMessage());
                log.error(msg, bse);
                throw new SecurityException(msg, bse);
View Full Code Here

Examples of org.apache.jetspeed.i18n.KeyedMessage

            } catch (SecurityException se)
            {
                throw se;
            } catch (Exception e)
            {
                KeyedMessage msg =
                    SecurityException.UNEXPECTED.create("GroupManager.removeGroup",
                                                        "GroupSecurityHandler.removeGroupPrincipal("+
                        GroupPrincipalImpl.getPrincipalNameFromFullPath((String) groups[i])+")",
                        e.getMessage());
                log.error(msg, e);
                throw new SecurityException(msg, e);
            }
            // Remove preferences
            Preferences groupPref = Preferences.userRoot().node(
                    (String) groups[i]);
            try
            {
                groupPref.removeNode();
            } catch (BackingStoreException bse)
            {
                KeyedMessage msg =
                    SecurityException.UNEXPECTED.create("Preferences.removeNode("+groups[i]+")",
                                                        bse.getMessage());
                log.error(msg, bse);
                throw new SecurityException(msg, bse);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.