cz.metacentrum.perun.core.api.Attribute.toString()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中cz.metacentrum.perun.core.api.Attribute.toString()方法的一些代码示例,展示了Attribute.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.toString()方法的具体详情如下:
包路径:cz.metacentrum.perun.core.api.Attribute
类名称:Attribute
方法名:toString

Attribute.toString介绍

暂无

代码示例

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute, Object attributeHolder, String message, Throwable cause){
  super(attribute.toString() + " Set for: " + attributeHolder + " - " + message, cause);
  this.attribute = attribute;
  this.attributeHolder = attributeHolder;
}

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute, Object attributeHolder, Object attributeHolderSecondary) {
  super(attribute.toString() + " Set for: " + attributeHolder + " and " + attributeHolderSecondary);
  this.attribute = attribute;
  this.attributeHolder = attributeHolder;
  this.attributeHolderSecondary = attributeHolderSecondary;
}

代码示例来源:origin: CESNET/perun

@Override
  public String toString() {
    return "AttributeHolders{" +
        "attribute=" + super.toString() +
        ", primaryHolder=" + primaryHolder +
        ", secondaryHolder=" + secondaryHolder +
        '}';
  }
}

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute, Object attributeHolder, Object attributeHolderSecondary, String message) {
  super(attribute.toString() + " Set for: " + attributeHolder + " and " + attributeHolderSecondary + " - " + message);
  this.attribute = attribute;
  this.attributeHolder = attributeHolder;
  this.attributeHolderSecondary = attributeHolderSecondary;
}

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute, Object attributeHolder, String message){
  super(attribute.toString() + " Set for: " + attributeHolder + " - " + message);
  this.attribute = attribute;
  this.attributeHolder = attributeHolder;
}

代码示例来源:origin: CESNET/perun

public AttributeValueException(Attribute attribute, String message, Throwable cause) {
  super(message + " " + attribute.toString(), cause);
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute) {
  super(attribute.toString());
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

public AttributeValueException(Attribute attribute, String message) {
  super(message + " " + attribute.toString());
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute, String message, Throwable cause) {
  super(attribute.toString() + " " + message, cause);
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

public AttributeValueException(Attribute attribute) {
  super(attribute.toString());
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute, Throwable cause) {
  super(attribute.toString(), cause);
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

public WrongAttributeValueException(Attribute attribute, String message) {
  super(attribute.toString() + " " + message);
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

public AttributeValueException(Attribute attribute, Throwable cause) {
  super(attribute.toString(), cause);
  this.attribute = attribute;
}

代码示例来源:origin: CESNET/perun

@Override
  public String toString() {
    StringBuilder str = new StringBuilder();

    return str.append(this.getClass().getSimpleName()).append(":[").append(
      (attribute == null ? "Attribute: NULL." : attribute.toString())).append(
      " Primary holder: ").append(primaryHolder == null ? "NULL. " : primaryHolder.toString()).append(
      " Secondary holder: ").append(secondaryHolder == null ? "NULL. " : secondaryHolder.toString()).append(
      ']').toString();
  }
}

代码示例来源:origin: CESNET/perun

User user = perun.getUsersManagerBl().getUserById(session, id);
Attribute emailAttribute = perun.getAttributesManagerBl().getAttribute(session, user, "urn:perun:user:attribute-def:def:preferredMail");
if (emailAttribute != null && StringUtils.hasText(emailAttribute.toString())) {
  emailDto.setReceiver((String) emailAttribute.getValue());

代码示例来源:origin: CESNET/perun

User user = perun.getUsersManagerBl().getUserById(session, id);
Attribute emailAttribute = perun.getAttributesManagerBl().getAttribute(session, user, "urn:perun:user:attribute-def:def:jabber");
if (emailAttribute != null && StringUtils.hasText(emailAttribute.toString())) {
  message.setTo((String) emailAttribute.getValue());

相关文章