use of org.jbehave.example.spring.security.domain.Organization in project jbehave-core by jbehave.
the class OrganizationSteps method setCurrentOrganization.
@When("current organization is $orgName")
public void setCurrentOrganization(String orgName) {
Organization org = organizationDao.findByName(orgName);
organizationManager.setOrganization(org);
}
use of org.jbehave.example.spring.security.domain.Organization in project jbehave-core by jbehave.
the class OrganizationSteps method createOrganizationWithName.
@Given("an organization named $orgNames")
@Alias("organizations named $orgNames")
public void createOrganizationWithName(List<String> orgNames) {
for (String orgName : orgNames) {
Organization org = new Organization();
org.setName(orgName);
org.setAuthenticationPolicy(new AuthenticationPolicy());
organizationDao.persist(org);
}
}
use of org.jbehave.example.spring.security.domain.Organization in project jbehave-core by jbehave.
the class UserSteps method setUserExpired.
@Given("user for $orgName $username is expired")
public void setUserExpired(String orgName, String username) {
Organization org = organizationDao.findByName(orgName);
User user = userDao.findUserByOrganizationAndUsername(org.getId(), username);
user.setExpired(true);
userDao.persist(user);
}
use of org.jbehave.example.spring.security.domain.Organization in project jbehave-core by jbehave.
the class UserSteps method createUsersFromTable.
@Given("the users for $orgName: $userTable")
public void createUsersFromTable(String orgName, ExamplesTable table) {
Organization org = organizationDao.findByName(orgName);
List<Parameters> parametersList = table.getRowsAsParameters(true);
for (Parameters parameters : parametersList) {
userDao.persist(new UserBuilder(org, parameters, table.getHeaders()).build());
}
}
use of org.jbehave.example.spring.security.domain.Organization in project jbehave-core by jbehave.
the class OrganizationSteps method updateOrganizationWithDefaultAuthPolicy.
@Given("a default authentication policy for $orgName")
public void updateOrganizationWithDefaultAuthPolicy(String orgName) {
Organization org = organizationDao.findByName(orgName);
org.setAuthenticationPolicy(new AuthenticationPolicy());
organizationDao.persist(org);
}
Aggregations