BrightSide Workbench Full Report + Source Code
org.turro.elephant.web.SocialImage Class Reference

Public Member Functions

 SocialImage (String url, int x, int y)
 
String getUrl ()
 
boolean isEmpty ()
 
boolean isLarge ()
 

Static Public Member Functions

static SocialImage getFromFiles (Collection< RepositoryFile > files)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file SocialImage.java.

Constructor & Destructor Documentation

◆ SocialImage()

org.turro.elephant.web.SocialImage.SocialImage ( String  url,
int  x,
int  y 
)

Definition at line 37 of file SocialImage.java.

37  {
38  this.url = url;
39  this.x = x;
40  this.y = y;
41  }
Here is the caller graph for this function:

Member Function Documentation

◆ getFromFiles()

static SocialImage org.turro.elephant.web.SocialImage.getFromFiles ( Collection< RepositoryFile files)
static

Definition at line 55 of file SocialImage.java.

55  {
56  for(RepositoryFile rf : files) {
57  try {
58  Dimension dimension = ImageUtil.dimension(rf.getFile());
59  if(dimension.getWidth() >= 200 || dimension.getHeight() >= 200) {
60  return new SocialImage(rf.getWebPath(), (int) dimension.getWidth(), (int) dimension.getHeight());
61  }
62  } catch (IOException ex) {}
63  }
64  return null;
65  }
SocialImage(String url, int x, int y)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUrl()

String org.turro.elephant.web.SocialImage.getUrl ( )

Definition at line 43 of file SocialImage.java.

43  {
44  return url;
45  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.elephant.web.SocialImage.isEmpty ( )

Definition at line 47 of file SocialImage.java.

47  {
48  return Strings.isBlank(url);
49  }
Here is the caller graph for this function:

◆ isLarge()

boolean org.turro.elephant.web.SocialImage.isLarge ( )

Definition at line 51 of file SocialImage.java.

51  {
52  return x >= 600;
53  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: