本文整理汇总了Java中org.isisaddons.module.security.dom.tenancy.ApplicationTenancy.getPath方法的典型用法代码示例。如果您正苦于以下问题:Java ApplicationTenancy.getPath方法的具体用法?Java ApplicationTenancy.getPath怎么用?Java ApplicationTenancy.getPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.isisaddons.module.security.dom.tenancy.ApplicationTenancy
的用法示例。
在下文中一共展示了ApplicationTenancy.getPath方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: upsert
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Programmatic
public Charge upsert(
final String reference,
final String name,
final String description,
final ApplicationTenancy applicationTenancy,
final Applicability applicability,
final Tax tax,
final ChargeGroup chargeGroup) {
final String atPath = applicationTenancy.getPath();
Charge charge = findByReference(reference);
if (charge == null) {
charge = create(reference, name, description, atPath, applicability);
}
charge.setApplicability(applicability);
charge.setApplicationTenancyPath(atPath);
charge.setName(name);
charge.setDescription(description);
charge.setTax(tax);
charge.setGroup(chargeGroup);
return charge;
}
示例2: init
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
public void init() {
if (applicationTenancyPath == null) {
final String username = userService.getUser().getName();
final ApplicationUser applicationUser = applicationUserRepository.findByUsername(username);
final ApplicationTenancy applicationTenancy = applicationUser.getTenancy();
if(applicationTenancy == null) {
throw new IllegalStateException(String.format("No application tenancy defined for user '%s'", username));
}
applicationTenancyPath = applicationTenancy.getPath();
} else {
throw new IllegalStateException(String.format("Application tenancy defined for object '%s'", this));
}
}
示例3: init
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
public void init() {
if (applicationTenancyPath == null) {
final String username = userService.getUser().getName();
final ApplicationUser applicationUser = applicationUserRepository.findByUsername(username);
String atPath = applicationUser.getAtPath();
final ApplicationTenancy applicationTenancy = applicationTenancyRepository.findByPathCached(atPath);
if(applicationTenancy == null) {
throw new IllegalStateException(String.format("No application tenancy defined for user '%s'", username));
}
applicationTenancyPath = applicationTenancy.getPath();
} else {
throw new IllegalStateException(String.format("Application tenancy defined for object '%s'", this));
}
}
示例4: currentUsersAtPath
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
protected String currentUsersAtPath() {
final ApplicationUser me = meService.me();
final ApplicationTenancy tenancy = me.getTenancy();
if(tenancy == null) {
throw new IllegalStateException("No application tenancy defined");
}
return tenancy.getPath();
}
示例5: create
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@MemberOrder(sequence = "2")
public TenantedEntity create(
@Parameter(maxLength = NonTenantedEntity.MAX_LENGTH_NAME)
@ParameterLayout(named="Name")
final String name,
final ApplicationTenancy tenancy) {
final TenantedEntity obj = new TenantedEntity(name, null, tenancy.getPath());
container.persistIfNotAlready(obj);
return obj;
}
示例6: newPerson
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Programmatic
public Person newPerson(
final String reference,
final String initials,
final String firstName,
final String lastName,
final PersonGenderType gender,
final ApplicationTenancy applicationTenancy) {
final String atPath = applicationTenancy != null ? applicationTenancy.getPath() : null;
return newPerson(reference, initials, firstName, lastName, gender, atPath);
}
示例7: Index
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
public Index(
final String reference,
final String name,
final ApplicationTenancy applicationTenancy){
super("reference");
this.reference = reference;
this.name = name;
this.applicationTenancyPath = applicationTenancy.getPath();
}
示例8: getAtPath
import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@PropertyLayout(named = "Application Level Path")
@Override
public String getAtPath() {
final ApplicationTenancy applicationTenancy = getApplicationTenancy();
return applicationTenancy != null ? applicationTenancy.getPath() : null;
}