File |
Line |
org\andromda\cartridges\ejb3\metafacades\EJB3SessionFacadeLogicImpl.java |
927 |
org\andromda\cartridges\ejb3\metafacades\EJB3SessionOperationFacadeLogicImpl.java |
320 |
return getPersistenceContainer().equalsIgnoreCase(EJB3Globals.PERSISTENCE_CONTAINER_WEBLOGIC);
}
/**
* @see EJB3SessionFacadeLogic#handleGetRolesAllowed()
*/
@Override
protected String handleGetRolesAllowed()
{
StringBuilder rolesAllowed = null;
String separator = "";
for (final Iterator iter = this.getNonRunAsRoles().iterator(); iter.hasNext(); )
{
if (rolesAllowed == null)
{
rolesAllowed = new StringBuilder();
}
rolesAllowed.append(separator);
Role role = (Role)iter.next();
rolesAllowed.append('"');
rolesAllowed.append(role.getName());
rolesAllowed.append('"');
separator = ", ";
}
return rolesAllowed != null ? rolesAllowed.toString() : null;
}
/**
* @see EJB3SessionFacadeLogic#handleIsPermitAll()
*/
@Override
protected boolean handleIsPermitAll()
{
boolean permitAll = false;
String permitAllStr = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_SECURITY_PERMIT_ALL);
if (StringUtils.isNotBlank(permitAllStr))
{
permitAll = BooleanUtils.toBoolean(permitAllStr);
}
return permitAll;
}
/**
* @see EJB3SessionFacadeLogic#handleIsDenyAll()
*/
@Override
protected boolean handleIsDenyAll()
{
boolean denyAll = false;
String denyAllStr = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_SECURITY_DENY_ALL);
if (StringUtils.isNotBlank(denyAllStr))
{
denyAll = BooleanUtils.toBoolean(denyAllStr);
}
return denyAll;
}
/**
* @see EJB3SessionFacadeLogic#handleGetSecurityRealm()
*/
@Override
protected String handleGetSecurityRealm() |
File |
Line |
org\andromda\cartridges\ejb3\metafacades\EJB3MessageDrivenFacadeLogicImpl.java |
505 |
org\andromda\cartridges\ejb3\metafacades\EJB3SessionFacadeLogicImpl.java |
1118 |
}
/**
* @see EJB3MessageDrivenFacadeLogic#handleGetInterceptorReferences()
*/
protected Collection<DependencyFacade> handleGetInterceptorReferences()
{
Collection<DependencyFacade> references = this.getSourceDependencies();
CollectionUtils.filter(
references,
new Predicate()
{
public boolean evaluate(Object object)
{
DependencyFacade dependency = (DependencyFacade)object;
ModelElementFacade targetElement = dependency.getTargetElement();
return (targetElement != null && targetElement.hasStereotype(EJB3Profile.STEREOTYPE_INTERCEPTOR));
}
});
CollectionUtils.transform(
references,
new Transformer()
{
public Object transform(final Object object)
{
return ((DependencyFacade)object).getTargetElement();
}
});
final Collection<DependencyFacade> interceptors = new LinkedHashSet<DependencyFacade>(references);
CollectionUtils.forAllDo(
references,
new Closure()
{
public void execute(Object object)
{
if (object instanceof EJB3InterceptorFacade)
{
interceptors.addAll(((EJB3InterceptorFacade)object).getInterceptorReferences());
}
}
});
return interceptors;
} |
File |
Line |
org\andromda\cartridges\ejb3\metafacades\EJB3EntityFacadeLogicImpl.java |
1717 |
org\andromda\cartridges\ejb3\metafacades\EJB3SessionFacadeLogicImpl.java |
1168 |
Collection<DependencyFacade> roles = this.getTargetDependencies();
CollectionUtils.filter(
roles,
new Predicate()
{
public boolean evaluate(final Object object)
{
DependencyFacade dependency = (DependencyFacade)object;
return dependency != null
&& dependency.getSourceElement() != null
&& dependency.getSourceElement() instanceof Role
&& !dependency.hasStereotype(EJB3Profile.STEREOTYPE_SECURITY_RUNAS);
}
});
CollectionUtils.transform(
roles,
new Transformer()
{
public Object transform(final Object object)
{
return ((DependencyFacade)object).getSourceElement();
}
});
final Collection allRoles = new LinkedHashSet(roles);
// add all roles which are generalizations of this one
CollectionUtils.forAllDo(
roles,
new Closure()
{
public void execute(final Object object)
{
allRoles.addAll(((Role)object).getAllSpecializations());
}
});
return allRoles;
}
/**
* @see EJB3EntityFacadeLogic#handleIsUseQueryCache()
*/
@Override
protected boolean handleIsUseQueryCache() |
File |
Line |
org\andromda\cartridges\ejb3\metafacades\EJB3MessageDrivenFacadeLogicImpl.java |
258 |
org\andromda\cartridges\ejb3\metafacades\EJB3SessionFacadeLogicImpl.java |
1006 |
return (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_MDB_SELECTOR);
}
/**
* @see EJB3MessageDrivenFacade#getRunAs()
*/
@Override
protected String handleGetRunAs()
{
String runAsRole = null;
DependencyFacade dependency = (DependencyFacade)CollectionUtils.find(
this.getTargetDependencies(),
new Predicate()
{
public boolean evaluate(final Object object)
{
DependencyFacade dependency = (DependencyFacade)object;
return dependency != null
&& dependency.getSourceElement() != null
&& dependency.getSourceElement() instanceof Role
&& dependency.hasStereotype(EJB3Profile.STEREOTYPE_SECURITY_RUNAS);
}
});
if (dependency != null)
{
Role role = (Role)dependency.getSourceElement();
runAsRole = role.getName();
}
return runAsRole;
}
/**
* @see EJB3MessageDrivenFacade#getSubscriptionDurability()
*/
@Override
protected String handleGetSubscriptionDurability() |
File |
Line |
org\andromda\cartridges\ejb3\metafacades\EJB3EntityFacadeLogicImpl.java |
1669 |
org\andromda\cartridges\ejb3\metafacades\EJB3SessionFacadeLogicImpl.java |
927 |
org\andromda\cartridges\ejb3\metafacades\EJB3SessionOperationFacadeLogicImpl.java |
320 |
return StringUtils.isNotBlank(this.getSecurityRealm());
}
/**
* @see EJB3EntityFacadeLogic#handleGetRolesAllowed()
*/
@Override
protected String handleGetRolesAllowed()
{
StringBuilder rolesAllowed = null;
String separator = "";
for (final Iterator iter = this.getNonRunAsRoles().iterator(); iter.hasNext(); )
{
if (rolesAllowed == null)
{
rolesAllowed = new StringBuilder();
}
rolesAllowed.append(separator);
Role role = (Role)iter.next();
rolesAllowed.append('"');
rolesAllowed.append(role.getName());
rolesAllowed.append('"');
separator = ", ";
}
return rolesAllowed != null ? rolesAllowed.toString() : null;
}
/**
* @see EJB3EntityFacadeLogic#handleGetSecurityRealm()
*/
@Override
protected String handleGetSecurityRealm() |
File |
Line |
org\andromda\cartridges\ejb3\metafacades\EJB3AssociationEndFacadeLogicImpl.java |
353 |
org\andromda\cartridges\ejb3\metafacades\EJB3EntityAttributeFacadeLogicImpl.java |
114 |
}
/**
* @see EJB3AssociationEndFacadeLogic#handleIsEager()
*/
@Override
protected boolean handleIsEager()
{
boolean isEager = false;
if (StringUtils.isNotBlank(this.getFetchType()))
{
if (EJB3Globals.FETCH_TYPE_EAGER.equalsIgnoreCase(this.getFetchType()))
{
isEager = true;
}
}
return isEager;
}
/**
* @see EJB3AssociationEndFacadeLogic#handleIsLazy()
*/
@Override
protected boolean handleIsLazy()
{
boolean isLazy = false;
if (StringUtils.isNotBlank(this.getFetchType()))
{
if (EJB3Globals.FETCH_TYPE_LAZY.equalsIgnoreCase(this.getFetchType()))
{
isLazy = true;
}
}
return isLazy;
}
/**
* @see EJB3AssociationEndFacadeLogic#handleIsOwning()
*/
@Override
protected boolean handleIsOwning() |