org.apache.isis.applib.Identifier.getMemberName()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.9k)|赞(0)|评价(0)|浏览(108)

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

Identifier.getMemberName介绍

暂无

代码示例

代码示例来源:origin: org.apache.isis.core/isis-core-applib

/**
 * Convenience method that returns the {@link Identifier#getMemberName()
 * member name} of the {@link #getIdentifier() identifier}.
 * 
 * @see #getIdentifier
 */
public String getMemberName() {
  return identifier.getMemberName();
}

代码示例来源:origin: org.apache.isis/applib

/**
 * Convenience method that returns the {@link Identifier#getMemberName()
 * member name} of the {@link #getIdentifier() identifier}.
 * 
 * @see #getIdentifier
 */
public String getMemberName() {
  return identifier.getMemberName();
}

代码示例来源:origin: org.apache.isis.core/isis-core-applib

public StringBuilder toNameParmsIdentityString(final StringBuilder buf) {
  buf.append(getMemberName());
  toParmsIdentityString(buf);
  return buf;
}

代码示例来源:origin: org.apache.isis/applib

public StringBuilder toNameParmsIdentityString(final StringBuilder buf) {
  buf.append(getMemberName());
  toParmsIdentityString(buf);
  return buf;
}

代码示例来源:origin: org.apache.isis.core/isis-core-applib

public String toNameParmsIdentityString() {
  return getMemberName() + toParmsIdentityString();
}

代码示例来源:origin: org.apache.isis.core/progmodel

private static String buildParameterTypeKey(final Identifier identifier, final String textType, final int paramNum) {
  return identifier.getClassName() + "." + MEMBER_TYPE_ACTION + "." + identifier.getMemberName() + "." + MEMBER_TYPE_PARAMETER + (paramNum + 1) + "." + textType;
}

代码示例来源:origin: org.apache.isis.core/isis-core-security-shiro

private static String asPermissionsString(Identifier identifier) {
  String fullyQualifiedClassName = identifier.getClassName();
  int lastDot = fullyQualifiedClassName.lastIndexOf('.');
  String packageName;
  String className;
  if(lastDot > 0) {
    packageName =fullyQualifiedClassName.substring(0, lastDot);
    className = fullyQualifiedClassName.substring(lastDot+1);
  } else {
    packageName = "";
    className = fullyQualifiedClassName;
  }
  return packageName + ":" + className + ":" + identifier.getMemberName();
}

代码示例来源:origin: org.apache.isis.core/progmodel

private static String buildMemberTypeKey(final Identifier identifier, final String textType, final String memberType) {
  final StringBuilder sb = new StringBuilder();
  sb.append(identifier.getClassName()).append(".");
  sb.append(memberType);
  final String memberName = identifier.getMemberName();
  if (!StringUtils.isNullOrEmpty(memberName)) {
    sb.append(".").append(memberName);
  }
  sb.append(".").append(textType);
  return sb.toString();
}

代码示例来源:origin: org.apache.isis/applib

public String toNameParmsIdentityString() {
  return getMemberName() + toParmsIdentityString();
}

代码示例来源:origin: org.apache.isis.core/metamodel

private FacetedMethod getMemberWithName(final String name) {
  final String searchName = NameUtils.simpleName(name);
  for (int i = 0; i < members.size(); i++) {
    final FacetedMethod member = members.get(i);
    if (member != null) {
      final String testName = NameUtils.simpleName(member.getIdentifier().getMemberName());
      if (testName.equals(searchName)) {
        members.set(i, null);
        return member;
      }
    }
  }
  return null;
}

代码示例来源:origin: org.apache.isis.runtimes.dflt.remoting/common

private ObjectMember getAssociationElseThrowException(final Identifier id, final ObjectSpecification specification) {
  final ObjectMember member = specification.getAssociation(id.getMemberName());
  if (member == null) {
    throw new IsisException("No property or collection found for id " + id);
  }
  return member;
}

代码示例来源:origin: org.apache.isis.runtimes.dflt.remoting/common

private ObjectMember getActionElseThrowException(final Identifier id, final ObjectSpecification specification) {
  final ObjectMember member = specification.getObjectAction(ActionType.USER, id.getMemberName(), loadParameterSpecifications(id));
  if (member == null) {
    throw new IsisException("No user action found for id " + id);
  }
  return member;
}

代码示例来源:origin: org.apache.isis.viewer/scimpi-dispatcher

private ForbiddenException(final Identifier identifier, final AuthenticationSession session, final boolean isVisibleAndUsabable) {
  super((identifier.getType() == Identifier.Type.PROPERTY_OR_COLLECTION ? "Field" : "Action") + " '" + identifier.getMemberName() + "' in " + identifier.getClassName() + " is not " + (isVisibleAndUsabable ? "visible/usable " : "visible") + " for " + session.getUserName() + " "
      + session.getRoles());
  this.identifier = identifier;
  this.session = session;
}

代码示例来源:origin: org.apache.isis.core/isis-core-metamodel

@Test
public void property_whenMethodNameIs_XxxxYyyZzz() throws Exception {
  final Method method = SomeDomainClass.class.getMethod("getAnotherBigDecimal");
  final Identifier identifierFor = FeatureType.PROPERTY.identifierFor(SomeDomainClass.class, method);
  assertThat(identifierFor.getMemberName(), is("anotherBigDecimal"));
}

代码示例来源:origin: org.apache.isis.core/metamodel

@Test
public void property_whenMethodNameIs_XxxxYyyZzz() throws Exception {
  final Method method = SomeDomainClass.class.getMethod("getAnotherBigDecimal");
  final Identifier identifierFor = FeatureType.PROPERTY.identifierFor(SomeDomainClass.class, method);
  assertThat(identifierFor.getMemberName(), is("anotherBigDecimal"));
}

代码示例来源:origin: isisaddons/isis-app-todoapp

case HIDE:
  if(getSubscriberBehaviour() == DemoBehaviour.UPDATE_COST_ACTION_HIDE && 
      ev.getIdentifier().getMemberName().equals("updateCost")) {
    ev.hide();
case DISABLE:
  if(getSubscriberBehaviour() == DemoBehaviour.UPDATE_COST_ACTION_DISABLE && 
      ev.getIdentifier().getMemberName().equals("updateCost")) {
    ev.disable("ToDoItemSubscriptions says: updateCost action disabled!");
case VALIDATE:
  if(getSubscriberBehaviour() == DemoBehaviour.UPDATE_COST_ACTION_INVALIDATE &&
      ev.getIdentifier().getMemberName().equals("updateCost")) {
    ev.invalidate("ToDoItemSubscriptions says: can't invoke updateCost action with these args!");

代码示例来源:origin: org.apache.isis.core/metamodel

protected ObjectMemberAbstract(final FacetedMethod facetedMethod, final FeatureType featureType, final ObjectMemberContext objectMemberContext) {
  final String id = facetedMethod.getIdentifier().getMemberName();
  if (id == null) {
    throw new IllegalArgumentException("Name must always be set");
  }
  this.facetedMethod = facetedMethod;
  this.featureType = featureType;
  this.id = id;
  this.defaultName = NameUtils.naturalName(this.id);
  this.authenticationSessionProvider = objectMemberContext.getAuthenticationSessionProvider();
  this.specificationLookup = objectMemberContext.getSpecificationLookup();
  this.adapterMap = objectMemberContext.getAdapterManager();
  this.querySubmitter = objectMemberContext.getQuerySubmitter();
  this.collectionTypeRegistry = objectMemberContext.getCollectionTypeRegistry();
}

代码示例来源:origin: org.apache.isis.core/isis-core-metamodel

@Test
public void property_whenMethodNameIs_XYyyZzz() throws Exception {
  final Method method = SomeDomainClass.class.getMethod("getABigDecimal");
  final Identifier identifierFor = FeatureType.PROPERTY.identifierFor(SomeDomainClass.class, method);
  assertThat(identifierFor.getMemberName(), is("ABigDecimal")); // very
                                 // odd
                                 // compared
                                 // to
                                 // anotherBigDecimal,
                                 // but
                                 // arises
                                 // from
                                 // Introspector
                                 // class,
                                 // so
                                 // presumably
                                 // part of
                                 // the
                                 // javabeans
                                 // spec.
}

代码示例来源:origin: org.apache.isis.core/metamodel

@Test
public void property_whenMethodNameIs_XYyyZzz() throws Exception {
  final Method method = SomeDomainClass.class.getMethod("getABigDecimal");
  final Identifier identifierFor = FeatureType.PROPERTY.identifierFor(SomeDomainClass.class, method);
  assertThat(identifierFor.getMemberName(), is("ABigDecimal")); // very
                                 // odd
                                 // compared
                                 // to
                                 // anotherBigDecimal,
                                 // but
                                 // arises
                                 // from
                                 // Introspector
                                 // class,
                                 // so
                                 // presumably
                                 // part of
                                 // the
                                 // javabeans
                                 // spec.
}

代码示例来源:origin: org.apache.isis.runtimes.dflt/runtime

final Oid aggregatedOid = new AggregatedOid(ownerAdapter.getOid(), identifier.getMemberName());
final ObjectAdapter aggregatedAdapter = createOrRecreateAdapter(pojo, aggregatedOid);

相关文章