/** * Gets a string that represents the signature of a method * * @param ejbName * name of the ejb * @param method * Method on which the signature is required * @return string that represents the signature of a method */ public static String getSignature(String ejbName, Method method) { Class clazz = method.getDeclaringClass(); String methItf = ""; if (javax.ejb.EJBHome.class.isAssignableFrom(clazz)) { methItf = "Home"; } else if (javax.ejb.EJBObject.class.isAssignableFrom(clazz)) { methItf = "Remote"; } else if (javax.ejb.EJBLocalHome.class.isAssignableFrom(clazz)) { methItf = "LocalHome"; } else if (javax.ejb.EJBLocalObject.class.isAssignableFrom(clazz)) { methItf = "Local"; } else if (java.rmi.Remote.class.isAssignableFrom(clazz)) { methItf = "ServiceEndpoint"; } return new EJBMethodPermission(ejbName, methItf, method).getActions(); } }
/** * Gets a string that represents the signature of a method * * @param ejbName * name of the ejb * @param method * Method on which the signature is required * @return string that represents the signature of a method */ public static String getSignature(String ejbName, Method method) { Class clazz = method.getDeclaringClass(); String methItf = ""; if (javax.ejb.EJBHome.class.isAssignableFrom(clazz)) { methItf = "Home"; } else if (javax.ejb.EJBObject.class.isAssignableFrom(clazz)) { methItf = "Remote"; } else if (javax.ejb.EJBLocalHome.class.isAssignableFrom(clazz)) { methItf = "LocalHome"; } else if (javax.ejb.EJBLocalObject.class.isAssignableFrom(clazz)) { methItf = "Local"; } else if (java.rmi.Remote.class.isAssignableFrom(clazz)) { methItf = "ServiceEndpoint"; } return new EJBMethodPermission(ejbName, methItf, method).getActions(); } }
/** * Returns the hash code value for this EJBMethodPermission. The properties * of the returned hash code must be as follows: <p> * <ul> * <li> During the lifetime of a Java application, the hashCode method * must return the same integer value every time it is called on a * EJBMethodPermission object. The value returned by hashCode for a * particular EJBMethodPermission need not remain consistent from * one execution of an application to another. * <li> If two EJBMethodPermission objects are equal according to the * equals method, then calling the hashCode method on each of the two * Permission objects must produce the same integer result (within an * application). * </ul> * <P> * @return the integer hash code value for this object. */ public int hashCode() { if (hashCodeValue == 0) { String hashInput; String actions = this.getActions(); if (actions == null) hashInput = this.getName(); else hashInput = this.getName() + " " + actions; hashCodeValue = hashInput.hashCode(); } return this.hashCodeValue; }
/** * Returns the hash code value for this EJBMethodPermission. The properties * of the returned hash code must be as follows: <p> * <ul> * <li> During the lifetime of a Java application, the hashCode method * must return the same integer value every time it is called on a * EJBMethodPermission object. The value returned by hashCode for a * particular EJBMethodPermission need not remain consistent from * one execution of an application to another. * <li> If two EJBMethodPermission objects are equal according to the * equals method, then calling the hashCode method on each of the two * Permission objects must produce the same integer result (within an * application). * </ul> * <P> * @return the integer hash code value for this object. */ public int hashCode() { if (hashCodeValue == 0) { String hashInput; String actions = this.getActions(); if (actions == null) hashInput = this.getName(); else hashInput = this.getName() + " " + actions; hashCodeValue = hashInput.hashCode(); } return this.hashCodeValue; }
private static Permissions addToUncheckedPermissions(Permissions permissions, MethodPermission mp, EJBMethodPermission ejbmp) { if (mp.isUnchecked()) { if (permissions == null) { permissions = new Permissions(); } permissions.add(ejbmp); if (_logger.isLoggable(Level.FINE)) { _logger.fine("JACC DD conversion: EJBMethodPermission ->(" + ejbmp.getName() + " " + ejbmp.getActions() + ") is (unchecked)"); } } return permissions; }
private void writeObject(ObjectOutputStream oos) throws IOException { ObjectOutputStream.PutField fields = oos.putFields(); fields.put("actions", this.getActions()); oos.writeFields(); } }
private static Permissions addToUncheckedPermissions(Permissions permissions, MethodPermission mp, EJBMethodPermission ejbmp) { if (mp.isUnchecked()) { if (permissions == null) { permissions = new Permissions(); } permissions.add(ejbmp); if (_logger.isLoggable(Level.FINE)) { _logger.fine("JACC DD conversion: EJBMethodPermission ->(" + ejbmp.getName() + " " + ejbmp.getActions() + ") is (unchecked)"); } } return permissions; }
private void writeObject(ObjectOutputStream oos) throws IOException { ObjectOutputStream.PutField fields = oos.putFields(); fields.put("actions",this.getActions()); oos.writeFields(); } }
private void writeObject(ObjectOutputStream oos) throws IOException { ObjectOutputStream.PutField fields = oos.putFields(); fields.put("actions",this.getActions()); oos.writeFields(); } }
private static Permissions addToExcludedPermissions(Permissions permissions, MethodPermission mp, EJBMethodPermission ejbmp) { if (mp.isExcluded()) { if (permissions == null) { permissions = new Permissions(); } permissions.add(ejbmp); if (_logger.isLoggable(Level.FINE)) { _logger.fine("JACC DD conversion: EJBMethodPermission ->(" + ejbmp.getName() + " " + ejbmp.getActions() + ") is (excluded)"); } } return permissions; }
private static Permissions addToExcludedPermissions(Permissions permissions, MethodPermission mp, EJBMethodPermission ejbmp) { if (mp.isExcluded()) { if (permissions == null) { permissions = new Permissions(); } permissions.add(ejbmp); if (_logger.isLoggable(Level.FINE)) { _logger.fine("JACC DD conversion: EJBMethodPermission ->(" + ejbmp.getName() + " " + ejbmp.getActions() + ") is (excluded)"); } } return permissions; }
private void writeObject(ObjectOutputStream oos) throws IOException { ObjectOutputStream.PutField fields = oos.putFields(); fields.put("actions", this.getActions()); oos.writeFields(); } }
private void writeObject(ObjectOutputStream oos) throws IOException { ObjectOutputStream.PutField fields = oos.putFields(); fields.put("actions", this.getActions()); oos.writeFields(); } }
private void writeObject(ObjectOutputStream oos) throws IOException { ObjectOutputStream.PutField fields = oos.putFields(); fields.put("actions",this.getActions()); oos.writeFields(); } }
private void writeObject(ObjectOutputStream oos) throws IOException { ObjectOutputStream.PutField fields = oos.putFields(); fields.put("actions",this.getActions()); oos.writeFields(); } }
/** * writeObject is used to establish the values of the serialized fields * before they are written to the output stream and need not be * implemented if the values of the serialized fields are always * available and up to date. The serialized fields are written to * the output stream in the same form as they would be written * by defaultWriteObject. */ private synchronized void writeObject(java.io.ObjectOutputStream s) throws IOException { s.putFields().put("actions",this.getActions()); s.writeFields(); }
/** * writeObject is used to establish the values of the serialized fields * before they are written to the output stream and need not be * implemented if the values of the serialized fields are always * available and up to date. The serialized fields are written to * the output stream in the same form as they would be written * by defaultWriteObject. */ private synchronized void writeObject(java.io.ObjectOutputStream s) throws IOException { s.putFields().put("actions",this.getActions()); s.writeFields(); }
if (_logger.isLoggable(Level.FINE)) { _logger.fine("JACC DD conversion: EJBMethodPermission ->(" + ejbmp.getName() + " " + ejbmp.getActions() + ")protected by role -> " + roleName);
if (_logger.isLoggable(Level.FINE)) { _logger.fine("JACC DD conversion: EJBMethodPermission ->(" + ejbmp.getName() + " " + ejbmp.getActions() + ")protected by role -> " + roleName);