Package com.tll.common.model

Examples of com.tll.common.model.SmbizEntityType


   */
  public static boolean canSetAsCurrent(ModelKey accountRef, ModelKey parentAccountRef) throws IllegalArgumentException {
    if(accountRef == null || !accountRef.isSet()) throw new IllegalArgumentException("Null or unset account ref");
    final AdminContext ac = getAdminContextCmd().getAdminContext();
    final AdminRole role = ac.getUserRole();
    final SmbizEntityType targetAccountType = (SmbizEntityType) accountRef.getEntityType();
    final ModelKey userAcntRef = ac.getUserAccount().getKey();
    assert userAcntRef != null;
    switch(targetAccountType) {
    case ASP:
    case ISP:
View Full Code Here


    if(OP_ACCOUNT_DETAIL.getText().equals(optionText)) {
      return new EditViewInitializer(AccountEditView.klas, crntUserAccount);
    }

    final SmbizEntityType crntUserAccountType = (SmbizEntityType) crntUserAccount.getEntityType();

    if(OP_ISPS.getText().equals(optionText)) {
      return new StaticViewInitializer(IspListingView.klas);
    }
    if(OP_MERCHANTS.getText().equals(optionText)) {
View Full Code Here

      new InterfaceStack(new NamedQuerySearch(SmbizEntityType.INTERFACE, "interface.summaryList", true),
          auxDataRequest, new InterfaceStack.IFieldPanelResolver() {

        @Override
        public FieldPanel<?> resolveFieldPanel(ModelKey mkey) {
          final SmbizEntityType type = (SmbizEntityType) mkey.getEntityType();
          switch(type) {
          case INTERFACE_SWITCH:
            return new SwitchInterfacePanel();
          case INTERFACE_SINGLE:
            return new MultiOptionInterfacePanel(true);
View Full Code Here

    toolbar.addViewOpButton(this.btnAddIntf, "Add Interface");
  }

  @Override
  protected boolean shouldHandleModelChangeEvent(ModelChangeEvent event) {
    final SmbizEntityType set = (SmbizEntityType) event.getModelKey().getEntityType();
    return set.isInterfaceType();
  }
View Full Code Here

  private static final String MODEL_PKG_TKN = "com.tll.model.";

  @Override
  public Class<?> resolveEntityClass(IEntityType entityType) throws IllegalArgumentException {
    if(entityType instanceof SmbizEntityType == false) throw new IllegalArgumentException("Expeceted SmbizEntityType");
    final SmbizEntityType set = (SmbizEntityType) entityType;
    try {
      return Class.forName(MODEL_PKG_TKN + StringUtil.enumStyleToCamelCase(set.name(), true));
    }
    catch(final ClassNotFoundException e) {
      throw new IllegalArgumentException(e);
    }
  }
View Full Code Here

  public static final MarshalOptions USER_OPTIONS_ADMIN_CONTEXT = new MarshalOptions(true, 1, new String[] { "parent" });

  @Override
  public MarshalOptions resolve(IEntityType entityType) throws IllegalArgumentException {
    if(entityType instanceof SmbizEntityType) {
      final SmbizEntityType set = (SmbizEntityType) entityType;
      switch(set) {
        case ACCOUNT:
        case ASP:
        case ISP:
        case MERCHANT:
View Full Code Here

    return "interfaces";
  }

  @Override
  protected void doInitialization(final AccountInterfaceViewInitializer initializer) {
    final SmbizEntityType at = SmbizAdmin.getAdminContextCmd().getAdminContext().getAccountType();
    final NamedQuerySearch nqs = new NamedQuerySearch(SmbizEntityType.INTERFACE, "acntIntf.smry", true);
    nqs.addParam(new EnumPropertyValue("accountType", at));
    intfStack =
      new InterfaceStack(nqs,
          auxDataRequest, new InterfaceStack.IFieldPanelResolver() {

        @Override
        public FieldPanel<?> resolveFieldPanel(ModelKey intfKey) {
          final SmbizEntityType type = (SmbizEntityType) intfKey.getEntityType();
          switch(type) {
          case INTERFACE_SWITCH:
            return new AccountSwitchInterfacePanel();
          case INTERFACE_SINGLE:
            return new AccountMultiOptionInterfacePanel(true);
View Full Code Here

    addWidget(intfStack);
  }

  @Override
  protected boolean shouldHandleModelChangeEvent(ModelChangeEvent event) {
    final SmbizEntityType set = (SmbizEntityType) event.getModelKey().getEntityType();
    return set == SmbizEntityType.ACCOUNT_INTERFACE;
  }
View Full Code Here

      new InterfaceStack(new NamedQuerySearch(SmbizEntityType.INTERFACE, "interface.summaryList", true),
          auxDataRequest, new InterfaceStack.IFieldPanelResolver() {

        @Override
        public FieldPanel<?> resolveFieldPanel(ModelKey mkey) {
          final SmbizEntityType type = (SmbizEntityType) mkey.getEntityType();
          switch(type) {
          case INTERFACE_SWITCH:
            return new SwitchInterfacePanel();
          case INTERFACE_SINGLE:
            return new MultiOptionInterfacePanel(true);
View Full Code Here

    return "interfaces";
  }

  @Override
  protected void doInitialization(final AccountInterfaceViewInitializer initializer) {
    final SmbizEntityType at = SmbizAdmin.getAdminContextCmd().getAdminContext().getAccountType();
    final NamedQuerySearch nqs = new NamedQuerySearch(SmbizEntityType.INTERFACE, "acntIntf.smry", true);
    nqs.addParam(new EnumPropertyValue("accountType", at));
    intfStack =
      new InterfaceStack(nqs,
          auxDataRequest, new InterfaceStack.IFieldPanelResolver() {

        @Override
        public FieldPanel<?> resolveFieldPanel(ModelKey intfKey) {
          final SmbizEntityType type = (SmbizEntityType) intfKey.getEntityType();
          switch(type) {
          case INTERFACE_SWITCH:
            return new AccountSwitchInterfacePanel();
          case INTERFACE_SINGLE:
            return new AccountMultiOptionInterfacePanel(true);
View Full Code Here

TOP

Related Classes of com.tll.common.model.SmbizEntityType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.