Codota Logo
TextLogic
Code IndexAdd Codota to your IDE (free)

How to use
TextLogic
in
com.manydesigns.portofino.pageactions.text

Best Java code snippets using com.manydesigns.portofino.pageactions.text.TextLogic (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.manydesigns/portofino-pageactions

  public static Attachment deleteAttachmentByCode(TextConfiguration textConfiguration, String code) {
    Attachment attachment = findAttachmentById(textConfiguration, code);
    if (attachment == null) {
      return null;
    } else {
      textConfiguration.getAttachments().remove(attachment);
      return attachment;
    }
  }
}
origin: com.manydesigns/portofino-pageactions

protected void commonUploadAttachment() throws IOException {
  logger.debug("Uploading attachment");
  viewAttachmentUrl = null;
  InputStream attachmentStream = upload.getInputStream();
  String attachmentId = RandomUtil.createRandomId();
  File dataFile = RandomUtil.getCodeFile(
      pageInstance.getDirectory(), ATTACHMENT_FILE_NAME_PATTERN, attachmentId);
  // copy the data
  FileOutputStream fileOutputStream = new FileOutputStream(dataFile);
  IOUtils.copyLarge(attachmentStream, fileOutputStream);
  if(textConfiguration == null) {
    textConfiguration = new TextConfiguration();
  }
  Attachment attachment = TextLogic.createAttachment(
      textConfiguration, attachmentId,
      upload.getFileName(), upload.getContentType(),
      upload.getSize());
  attachment.setDownloadable(uploadDownloadable);
  viewAttachmentUrl =
      generateViewAttachmentUrl(attachmentId);
  saveConfiguration(textConfiguration);
  logger.info("Attachment uploaded: " + upload.getFileName() + " (" + attachmentId + ")");
  IOUtils.closeQuietly(attachmentStream);
  IOUtils.closeQuietly(fileOutputStream);
  upload.delete();
  logger.debug("Upload resources cleaned");
}
origin: com.manydesigns/portofino-pageactions

for (String code : selection) {
  Attachment attachment =
      TextLogic.deleteAttachmentByCode(textConfiguration, code);
  if (attachment == null) {
    logger.warn("Ignoring non-existing attachment with code: {}", code);
origin: ManyDesigns/Portofino

  public static Attachment deleteAttachmentByCode(TextConfiguration textConfiguration, String code) {
    Attachment attachment = findAttachmentById(textConfiguration, code);
    if (attachment == null) {
      return null;
    } else {
      textConfiguration.getAttachments().remove(attachment);
      return attachment;
    }
  }
}
origin: com.manydesigns/portofino-pageactions

TextLogic.findAttachmentById(textConfiguration, id);
com.manydesigns.portofino.pageactions.textTextLogic

Most used methods

  • findAttachmentById
  • createAttachment
  • deleteAttachmentByCode

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now