void copy(Set s) { Iterator i = s.iterator(); defaults = new Properties(); while ( i.hasNext() ) { EnvironmentProperty p = (EnvironmentProperty)i.next(); if ( p.getName().startsWith(ejb10Prefix) ) { String newName = p.getName().substring(ejb10Prefix.length()); defaults.put(newName, p.getValue()); } } }
void copy(Set s) { Iterator i = s.iterator(); defaults = new Properties(); while ( i.hasNext() ) { EnvironmentProperty p = (EnvironmentProperty)i.next(); if ( p.getName().startsWith(ejb10Prefix) ) { String newName = p.getName().substring(ejb10Prefix.length()); defaults.put(newName, p.getValue()); } } }
public void removeActivationConfigPropertyByName(String name) { for(Iterator iter = activationConfig.getActivationConfig().iterator(); iter.hasNext();) { EnvironmentProperty next = (EnvironmentProperty) iter.next(); if( next.getName().equals(name) ) { iter.remove(); break; } } }
public void removeRuntimeActivationConfigPropertyByName(String name) { for(Iterator<EnvironmentProperty> iter = runtimeActivationConfig.getActivationConfig().iterator(); iter.hasNext();) { EnvironmentProperty next = iter.next(); if( next.getName().equals(name) ) { iter.remove(); break; } } }
private static String getFilteredPropValue(EnvironmentProperty prop) { if (prop == null) return "null"; String propname = prop.getName(); if (propname.toLowerCase().contains("password")) return "********"; return (prop.getResolvedValue()); }
/** * Returns the environment property object searching on the supplied key. * throws an illegal argument exception if no such environment property exists. */ public EnvironmentProperty getEnvironmentPropertyByName(String name) { for (Iterator itr = this.getEnvironmentProperties().iterator(); itr.hasNext();) { EnvironmentProperty ev = (EnvironmentProperty) itr.next(); if (ev.getName().equals(name)) { return ev; } } throw new IllegalArgumentException("no env-entry of name " + name); }
/** * Returns a formatted version of this object as a String. */ public void print(StringBuffer toStringBuffer) { toStringBuffer.append("Role-Ref-Env-Prop: ").append(super.getName()).append("@").append( this.getRole()).append("@").append(super.getDescription()); }
/** * Returns a formatted version of this object as a String. */ public void print(StringBuffer toStringBuffer) { toStringBuffer.append("Role-Ref-Env-Prop: ").append(super.getName()).append("@").append( this.getRole()).append("@").append(super.getDescription()); }
public EnvironmentProperty getEnvironmentPropertyByName(String name) { for (Iterator itr = this.getEnvironmentProperties().iterator(); itr.hasNext();) { EnvironmentProperty ev = (EnvironmentProperty) itr.next(); if (ev.getName().equals(name)) { return ev; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionhasnoenvpropertybyname", "This class has no environment property by the name of {0}", new Object[] {name})); }
public String getRuntimeActivationConfigValue(String name) { for(Iterator iter = runtimeActivationConfig.getActivationConfig().iterator(); iter.hasNext();) { EnvironmentProperty next = (EnvironmentProperty) iter.next(); if( next.getName().equals(name) ) { return (String) next.getValue(); } } return null; }
public void removeActivationConfigProperty(EnvironmentProperty prop) { for(Iterator iter = activationConfig.getActivationConfig().iterator(); iter.hasNext();) { EnvironmentProperty next = (EnvironmentProperty) iter.next(); if( next.getName().equals(prop.getName()) && next.getValue().equals(prop.getValue()) ) { iter.remove(); break; } } }
public void removeRuntimeActivationConfigProperty(EnvironmentProperty prop) { for(Iterator iter = runtimeActivationConfig.getActivationConfig().iterator(); iter.hasNext();) { EnvironmentProperty next = (EnvironmentProperty) iter.next(); if( next.getName().equals(prop.getName()) && next.getValue().equals(prop.getValue()) ) { iter.remove(); break; } } }
public String getActivationConfigValue(String name) { for(Iterator iter = activationConfig.getActivationConfig().iterator(); iter.hasNext();) { EnvironmentProperty next = (EnvironmentProperty) iter.next(); if( next.getName().equals(name) ) { return (String) next.getValue(); } } return null; }
private void handleException(Exception ex, EnvironmentProperty prop, Object bean) throws ConnectorRuntimeException { logger.log(Level.WARNING, "rardeployment.exception_on_invoke_setter", new Object[]{prop.getName(), getFilteredPropValue(prop), ex.getMessage()}); if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Exception while trying to set " + prop.getName() + " and value " + getFilteredPropValue(prop), ex + " on an instance of " + bean.getClass()); } throw(ConnectorRuntimeException) (new ConnectorRuntimeException(ex.getMessage()).initCause(ex)); }
public void putActivationConfigProperty(EnvironmentProperty prop) { // remove first an existing property with the same name removeActivationConfigPropertyByName(prop.getName()); activationConfig.getActivationConfig().add(prop); }
public void putActivationConfigProperty(EnvironmentProperty prop) { // remove first an existing property with the same name removeActivationConfigPropertyByName(prop.getName()); activationConfig.getActivationConfig().add(prop); }
/** * Construct the role reference with the same name and rolename the same * as the environment property value. * @param the environment property instance. */ public RoleReference(EnvironmentProperty environmentProperty) { super(environmentProperty.getName(), environmentProperty.getDescription(), ""); this.setValue(environmentProperty.getValue()); }
private void addOrMergeEnvironmentProperty( EnvironmentProperty environmentProperty) { try { EnvironmentProperty existing = getEnvironmentPropertyByName(environmentProperty.getName()); for (InjectionTarget next : environmentProperty.getInjectionTargets()) { existing.addInjectionTarget(next); } } catch(IllegalArgumentException e) { addEnvironmentProperty(environmentProperty); } }