当前位置: 首页>>代码示例>>Java>>正文


Java ApplicationTenancy.getPath方法代码示例

本文整理汇总了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;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:27,代码来源:ChargeRepository.java

示例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));
    }

}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:15,代码来源:AbstractPersistable.java

示例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));
    }
}
 
开发者ID:bibryam,项目名称:semat,代码行数:15,代码来源:AbstractPersistable.java

示例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();
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:9,代码来源:SimilarToService.java

示例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;
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:11,代码来源:TenantedEntities.java

示例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);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:12,代码来源:PersonRepository.java

示例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();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:10,代码来源:Index.java

示例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;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:7,代码来源:UdoDomainObject.java


注:本文中的org.isisaddons.module.security.dom.tenancy.ApplicationTenancy.getPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。