Tabnine Logo
Messages
Code IndexAdd Tabnine to your IDE (free)

How to use
Messages
in
de.tsl2.nano.core

Best Java code snippets using de.tsl2.nano.core.Messages (Showing top 16 results out of 315)

origin: net.sf.tsl2nano/tsl2.nano.serviceaccess

/**
 * checkPrincipal, throws SecurityException if not
 * 
 * @param principal principal
 */
public void checkPrincipal(Principal principal) {
  if (!hasPrincipal(principal)) {
    final String msg = Messages.getFormattedString(Messages.getString("tsl2nano.login.noprincipal"),
      new Object[] { getUser(), principal.getName() });
    throw new SecurityException(msg);
  }
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * constructor
 * 
 * @param id
 * @param shortDescription
 * @param longDescription
 * @param actionMode mode {@link IAction#MODE_DLG_CANCEL} or {@link IAction#MODE_DLG_OK}.
 * @param showFinishDialog whether to show a finish info dialog.
 */
public SecureAction(String id,
    String shortDescription,
    String longDescription,
    int actionMode) {
  super(id, Messages.getStringOpt(shortDescription, true), Messages.getStringOpt(longDescription));
  this.actionMode = actionMode;
  LOG.info("creating dialog action with action-id and permission-id: '" + id + "' and label '" + shortDescription);
}
origin: net.sf.tsl2nano/tsl2.nano.serviceaccess

/**
 * checkDelegate
 * @param interfaze
 * @param delegate
 */
static <T> void checkDelegate(Class<T> interfaze, T delegate) {
  if (delegate == null || !interfaze.isAssignableFrom(delegate.getClass())) {
    throw new ManagedException("the delegate instance must implement the service interface!\ninterface: " + interfaze
      + "\ndelegate: "
      + Messages.stripParameterBrackets(String.valueOf(delegate))
      + "\n\nmostly the reason are missing appserver-client-libraries to your client.");
  }
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * will search for the actionId in the resource bundle - then in tsl2nano base bundle - if not found, the action
 * simple name will be returned
 * 
 * @param actionId full action id
 * @param actionSimpleName simple action name
 * @param if true, the tooltip for the action will be evaluated
 * @return text to show on action
 */
public static final String getActionText(String actionId, boolean tooltip) {
  final String tooltip_postfix = (tooltip ? Messages.POSTFIX_TOOLTIP : "");
  final String actionSimpleName = actionId.substring(actionId.lastIndexOf(".") + 1);
  String text = Messages.getString(actionId + tooltip_postfix);
  if (Messages.unknown(text)) {
    text = Messages.getString("tsl2nano." + actionSimpleName + tooltip_postfix);
    if (Messages.unknown(text)) {
      return StringUtil.toFirstUpper(actionSimpleName);
    } else if (tooltip) {
      return "";
    } else {
      return text;
    }
  }
  return text;
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * constructor
 * 
 * @param method
 */
public MethodAction(Method method) {
  super(createId(method), createName(method),
    Messages.getStringOpt(method.toGenericString()));
  setMethod(method);
  String imagePath = getId() + ".icon";
  if (Messages.hasKey(imagePath)) {
    setImagePath(Messages.getString(imagePath));
  } else {
    setImagePath(DEFAULT_ICON);
  }
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

@Override
public COLLECTIONTYPE action() throws Exception {
  //TODO: fire refresh event
  searchStatus = Messages.getFormattedString("tsl2nano.searchdialog.searchrunning");
  ENV.get(Profiler.class).starting(this, getName());
  COLLECTIONTYPE result = (COLLECTIONTYPE) getBeanFinder().getData((String) getParameter(0));
  searchStatus = Messages.getFormattedString("tsl2nano.searchdialog.searchresultcount",
    result.size());
  if (openAction != null) {
    openAction.setDefault(true);
  }
  return result;
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * getActionId
 * 
 * @param beanType presenters bean type to create an action for
 * @param packedInList whether it is a bean instance or a bean container
 * @param actionName simple action name
 * @return full action id
 */
public static final String getActionId(Class<?> beanType, boolean packedInList, String actionName) {
  final String type =
    BeanClass.getName(beanType).toLowerCase() + (packedInList ? Messages.getString("tsl2nano.list")
      .toLowerCase()
      : "");
  return type + "." + actionName.toLowerCase();
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

public Collection<T> getData(T from, Object to) {
  searchStatus = Messages.getFormattedString("tsl2nano.searchdialog.searchrunning");
  ENV.get(Profiler.class).starting(this, getName());
  Message.send(searchStatus);
  searchStatus = Messages.getFormattedString("tsl2nano.searchdialog.searchresultcount",
    result.size());
  Message.send(searchStatus);
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * provides a map containing all formatted single value attributes of the given bean
 * 
 * @param bean bean to evaluate
 * @param keyPrefix (optional) key name prefix (normally ending with a dot)
 * @param translateKeys if true, all keys will be translated
 * @param filterAttributes attributes to be filtered (ignored)
 * @param format formatter (use {@link DefaultFormat} if unknown)
 * @return map containing formatted values
 */
public static Map<String, Object> toFormattedMap(Object bean,
    String keyPrefix,
    boolean translateKeys,
    Format format,
    String... filterAttributes) {
  final Map<String, Object> valueMap = keyPrefix != null ? BeanUtil.toValueMap(bean,
    keyPrefix,
    true,
    filterAttributes) : BeanUtil.toValueMap(bean, true, true, false, filterAttributes);
  final Set<String> keySet = valueMap.keySet();
  final Map<String, Object> formattedMap = new LinkedHashMap<String, Object>();
  for (final String k : keySet) {
    final String key = translateKeys ? Messages.getString(k) : k;
    formattedMap.put(key, format.format(valueMap.get(k)));
  }
  return formattedMap;
}
origin: net.sf.tsl2nano/tsl2.nano.terminal

@Override
public String ask(Properties env) {
  String ask = constraints.getType().getSimpleName();
  if (constraints.getMinimum() != null || constraints.getMaximum() != null) {
    ask += " between " + constraints.getMinimum() != null ? constraints.getMinimum() : "<any>"
      + constraints.getMaximum() != null ? constraints.getMaximum() : "<any>";
  } else if (constraints.getAllowedValues() != null) {
    ask += " as one of: " + StringUtil.toString(constraints.getAllowedValues(), 60);
  }
  return Messages.getFormattedString("tsl2nano.entervalue", ask, StringUtil.toFirstUpper(name))
    + POSTFIX_QUESTION;
}
origin: net.sf.tsl2nano/tsl2.nano.serviceaccess

  throw new FailedLoginException(Messages.getString("tsl2nano.login.error.user"));
} else {
  throw new FailedLoginException(Messages.getString("tsl2nano.login.error.password"));
origin: net.sf.tsl2nano/tsl2.nano.terminal

public static String translate(String name) {
  return StringUtil.toFirstUpper(Messages.getStringOpt(name));
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

Messages.getFormattedString("tsl2nano.searchdialog.searchresultcount", this.collection.size());
origin: net.sf.tsl2nano/tsl2.nano.descriptor

@Override
public Object action() throws Exception {
  //TODO: fire refresh event
  getBeanFinder().reset();
  if (!isStaticCollection && collection != null) {
    collection.clear();
  }
  setSelected();
  searchStatus =
    isStaticCollection || !hasMode(MODE_SEARCHABLE) ? "" : Messages
      .getString("tsl2nano.searchdialog.nosearch");
  return null;
}
origin: net.sf.tsl2nano/tsl2.nano.descriptor

if (actionSortColumn == null) {
  actionSortColumn =
    new CommonAction<Object>(name + POSTFIX_SORT, Messages.getStringOpt(getPresentable().getLabel(), true),
      getDescription()) {
origin: net.sf.tsl2nano/tsl2.nano.descriptor

/**
 * creates a save action for the given bean. the action-id will be 'bean.getClass().save' - that will be used as
 * permission id, too.
 * 
 * @param bean bean to save
 * @param actionId action id (important for user permissions!)
 */
protected SecureAction<T> createSaveAction(final Object bean, String actionId) {
  final String saveLabel =
    BeanContainer.isInitialized() && BeanContainer.instance().isPersistable(getDefiningClass(clazz))
      && !CompositionFactory.contains(bean) ? Messages
        .getString("tsl2nano.save") : Messages.getString("tsl2nano.assign");
  return new SaveAction(bean, actionId, saveLabel, saveLabel, IAction.MODE_DLG_OK);
}
de.tsl2.nano.coreMessages

Most used methods

  • getFormattedString
  • getString
  • getStringOpt
  • hasKey
  • stripParameterBrackets
  • unknown

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JFrame (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now