Tabnine Logo
Content.getExposedUri
Code IndexAdd Tabnine to your IDE (free)

How to use
getExposedUri
method
in
it.tidalwave.northernwind.core.model.Content

Best Java code snippets using it.tidalwave.northernwind.core.model.Content.getExposedUri (Showing top 4 results out of 315)

origin: it.tidalwave.northernwind/it-tidalwave-northernwind-frontend-components

/*******************************************************************************************************************
 *
 *
 ******************************************************************************************************************/
@Nonnull
private Content findPostByExposedUri (final List<Content> allPosts, final @Nonnull ResourcePath exposedUri)
 throws NotFoundException, IOException
 {
  for (final Content post : allPosts)
   {
    try
     {
      if (exposedUri.equals(post.getExposedUri()))
       {
        return post;
       }
     }
    catch (NotFoundException e)
     {
      log.warn("{}", e.toString());
     }
    catch (IOException e)
     {
      log.warn("", e);
     }
   }
  throw new NotFoundException("Blog post with exposedUri=" + exposedUri.asString());
 }
origin: it.tidalwave.northernwind/it-tidalwave-northernwind-frontend-components

 @Override
 protected List<? extends SiteNode> computeResults()
  {
   log.info("findCompositeContents()");
   final List<SiteNode> results = new ArrayList<>();
   try
    {
     final ResourceProperties componentProperties = siteNode.getPropertyGroup(view.getId());
     for (final Content post : findAllPosts(componentProperties))
      {
       try
        {
         final ResourcePath relativeUri = siteNode.getRelativeUri().appendedWith(post.getExposedUri());
         results.add(new ChildSiteNode(siteNode, relativeUri, post.getProperties()));
        }
       catch (NotFoundException | IOException e)
        {
         log.warn("While reading properties", e);
        }
      }
    }
   catch (NotFoundException | IOException e)
    {
     log.warn("While reading property group", e);
    }
   log.info(">>>> returning: {}", results);
   return results;
  }
};
origin: it.tidalwave.northernwind/it-tidalwave-northernwind-core-default

@Override @Nonnull
protected String filter (final @Nonnull Matcher matcher)
 throws NotFoundException, IOException
 {
  final String relativePath = matcher.group(1);
  final String contentRelativePath = matcher.group(2);
  final String language = matcher.group(4);
  final Site site = siteProvider.get().getSite();
  final SiteNode siteNode = site.find(SiteNode.class).withRelativePath(relativePath).result();
  final Content content = site.find(Content.class).withRelativePath(contentRelativePath).result();
  final ResourcePath path = siteNode.getRelativeUri().appendedWith(content.getExposedUri());
  final String link = site.createLink(path);
  return ((language == null) || (postProcessor == null)) ? link : postProcessor.postProcess(link, language);
 }
origin: it.tidalwave.northernwind/it-tidalwave-northernwind-core-default

@Override @Nonnull
protected List<? extends Content> computeResults()
 {
  try
   {
    final Content content = mock(Content.class);
    if (relativePath.equals("/"))
     {
      when(content.getExposedUri()).thenReturn(new ResourcePath());
     }
    else
     {
      when(content.getExposedUri()).thenReturn(new ResourcePath("EXPOSED-" + relativePath.substring(1)
                                       .replace('/', '-')
                                       .replace(' ', '-')));
     }
    return Arrays.asList(content);
   }
  catch (NotFoundException e)
   {
    throw new RuntimeException(e);
   }
  catch (IOException e)
   {
    throw new RuntimeException(e);
   }
 }
it.tidalwave.northernwind.core.modelContentgetExposedUri

Popular methods of Content

  • getProperties
  • as
  • findChildren

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Permission (java.security)
    Legacy security code; do not use.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Best plugins for Eclipse
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