Rev 1670 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package pt.estgp.estgweb.domain;
import pt.estgp.estgweb.services.bpmnprocess.types.DomainRoleProxy;
/**
* Created by jorgemachado on 09/02/17.
*/
public class BpmnActorPoolInstanceImpl
extends BpmnActorPoolInstance
{
public boolean hasRole
(1.5.0/docs/api/java/lang/String.html">String r
)
{
if (r ==
null || getDomainRolesProxy
() ==
null || getDomainRolesProxy
().
getRoles() ==
null || getDomainRolesProxy
().
getRoles().
size() == 0
)
return false;
for (DomainRoleProxy role : getDomainRolesProxy
().
getRoles())
{
if (role.
getRole().
equals(r
))
return true;
}
return false;
}
public void replaceRole
(1.5.0/docs/api/java/lang/String.html">String oldRole,
1.5.0/docs/api/java/lang/String.html">String newRole
)
{
if (oldRole ==
null || newRole ==
null || getDomainRolesProxy
() ==
null || getDomainRolesProxy
().
getRoles() ==
null || getDomainRolesProxy
().
getRoles().
size() == 0
)
return;
for (DomainRoleProxy role : getDomainRolesProxy
().
getRoles())
{
if (role.
getRole().
equals(oldRole
))
{
role.
setRole(newRole
);
break;
}
}
}
}