Package org.javlo.ztatic
Class StaticInfo
- java.lang.Object
-
- org.javlo.ztatic.StaticInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStaticInfo.Positionstatic classStaticInfo.ReferenceBeanstatic classStaticInfo.StaticFileSortstatic classStaticInfo.StaticFileSortByAccessstatic classStaticInfo.StaticFileSortByPopularitystatic classStaticInfo.StaticInfoSortByCreationDatestatic classStaticInfo.StaticInfoSortByDatestatic classStaticInfo.StaticSort
-
Field Summary
Fields Modifier and Type Field Description static String_STATIC_INFO_DIRstatic intACCES_DAYSstatic intDEFAULT_FOCUS_Xstatic intDEFAULT_FOCUS_Ystatic StaticInfoEMPTY_INSTANCEstatic StringIMAGE_SIZE_PREFIXprotected static Loggerloggercreate a static logger.
-
Constructor Summary
Constructors Constructor Description StaticInfo()
-
Method Summary
-
-
-
Field Detail
-
EMPTY_INSTANCE
public static final StaticInfo EMPTY_INSTANCE
-
_STATIC_INFO_DIR
public static final String _STATIC_INFO_DIR
-
DEFAULT_FOCUS_X
public static final int DEFAULT_FOCUS_X
- See Also:
- Constant Field Values
-
DEFAULT_FOCUS_Y
public static final int DEFAULT_FOCUS_Y
- See Also:
- Constant Field Values
-
logger
protected static Logger logger
create a static logger.
-
ACCES_DAYS
public static final int ACCES_DAYS
- See Also:
- Constant Field Values
-
IMAGE_SIZE_PREFIX
public static final String IMAGE_SIZE_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContextWithContent
public ContentContext getContextWithContent(ContentContext ctx)
-
getShareInstance
public static StaticInfo getShareInstance(ContentContext ctx, String inStaticURL) throws Exception
instance of static info sur shared file- Parameters:
ctx-inStaticURL-- Returns:
- Throws:
ConfigurationExceptionIOExceptionException
-
isStaticInfoKey
public static boolean isStaticInfoKey(Object key)
-
getInstance
public static StaticInfo getInstance(ContentContext ctx, File file) throws Exception
- Throws:
Exception
-
getInstance
public static StaticInfo getInstance(ContentContext ctx, String inStaticURL) throws Exception
- Throws:
Exception
-
getFullDescription
public String getFullDescription(ContentContext ctx)
-
getFullDescription
public String getFullDescription(ContentContext ctx, boolean showTitle)
-
getManualDescription
public String getManualDescription(ContentContext ctx)
-
getReference
public String getReference(ContentContext ctx)
-
setReference
public void setReference(ContentContext ctx, String ref)
-
getLanguage
public String getLanguage(ContentContext ctx)
-
getReferenceBean
public StaticInfo.ReferenceBean getReferenceBean(ContentContext ctx)
-
setLanguage
public void setLanguage(ContentContext ctx, String lg)
-
isResized
public boolean isResized(ContentContext ctx)
-
setResized
public void setResized(ContentContext ctx, boolean resized)
-
getDescription
public String getDescription(ContentContext ctx)
-
save
public void save(ContentContext ctx) throws ServiceException, Exception
- Throws:
ServiceExceptionException
-
setDescription
public void setDescription(ContentContext ctx, String description)
-
getManualLocation
public String getManualLocation(ContentContext ctx)
-
getLocation
public String getLocation(ContentContext ctx)
-
getPosition
public StaticInfo.Position getPosition(ContentContext ctx)
-
getGeoLocation
public String getGeoLocation(ContentContext ctx) throws IOException
- Throws:
IOException
-
setLocation
public void setLocation(ContentContext ctx, String location)
-
getTitle
public String getTitle(ContentContext ctx)
-
getManualTitle
public String getManualTitle(ContentContext ctx)
-
getId
public String getId(ContentContext ctx)
-
setInitialised
public void setInitialised(ContentContext ctx)
-
isInitialised
public boolean isInitialised(ContentContext ctx)
-
setTitle
public void setTitle(ContentContext ctx, String title)
-
getManualDate
public Date getManualDate(ContentContext ctx)
-
getCreationDate
public Date getCreationDate(ContentContext ctx)
-
getAuthors
public String getAuthors(ContentContext ctx)
-
setAuthors
public void setAuthors(ContentContext ctx, String authors)
-
resetDate
public void resetDate()
-
getDate
public Date getDate(ContentContext ctx)
-
getFileDate
public Date getFileDate(ContentContext ctx)
-
setDate
public void setDate(ContentContext ctx, Date date)
-
getResource
public String getResource(ContentContext ctx)
-
setResource
public void setResource(ContentContext ctx, String resource)
-
setEmptyDate
public void setEmptyDate(ContentContext ctx)
-
isEmptyDate
public boolean isEmptyDate(ContentContext ctx)
-
getSize
public long getSize()
-
getStaticURL
public String getStaticURL()
-
getFolder
public String getFolder()
-
getFocusZoneX
public int getFocusZoneX(ContentContext ctx)
return the focus point of a image. Return always the focus point of edit mode (problem with image cache).- Parameters:
ctx-- Returns:
-
getFocusZoneY
public int getFocusZoneY(ContentContext ctx)
return the focus point of a image. Return always the focus point of edit mode (problem with image cache).- Parameters:
ctx-- Returns:
-
isShared
public boolean isShared(ContentContext ctx)
-
setShared
public void setShared(ContentContext ctx, boolean shared)
-
setFocusZoneX
public void setFocusZoneX(ContentContext ctx, int focusZoneX)
change the focus point on a image.- Parameters:
ctx-focusZoneX-
-
setFocusZoneY
public void setFocusZoneY(ContentContext ctx, int focusZoneY)
change the focus point on a image.- Parameters:
ctx-focusZoneY-
-
setLinkedDate
public void setLinkedDate(Date linkedDate)
-
setLinkedTitle
public void setLinkedTitle(String linkedTitle)
-
setLinkedDescription
public void setLinkedDescription(String linkedDescription)
-
setLinkedLocation
public void setLinkedLocation(String linkedLocation)
-
isPertinent
public boolean isPertinent(ContentContext ctx)
-
delete
public boolean delete(ContentContext ctx)
-
setFile
public void setFile(File file)
-
getFile
public File getFile()
-
resetCRC32
public void resetCRC32()
-
getCRC32
public long getCRC32()
-
renameFile
public void renameFile(ContentContext ctx, File newFile) throws Exception
- Throws:
Exception
-
deleteFile
public void deleteFile(ContentContext ctx) throws Exception
- Throws:
Exception
-
duplicateFile
public void duplicateFile(ContentContext ctx, File newFile) throws Exception
- Throws:
Exception
-
getAccessFromSomeDays
public int getAccessFromSomeDays(ContentContext ctx) throws Exception
- Throws:
Exception
-
getAccess
public int getAccess(ContentContext ctx, Date date)
-
addAccess
public void addAccess(ContentContext ctx)
-
getTags
public List<String> getTags(ContentContext ctx)
-
getKeywords
public List<String> getKeywords(ContentContext ctx)
-
setKeywords
public void setKeywords(ContentContext ctx, List<String> keywords)
-
isAutoFill
public boolean isAutoFill(ContentContext ctx)
-
setAutoFill
public void setAutoFill(ContentContext ctx, boolean value)
-
getTaxonomy
public Set<String> getTaxonomy(ContentContext ctx)
-
setTaxonomy
public void setTaxonomy(ContentContext ctx, Set<String> taxonomy)
-
addTag
public void addTag(ContentContext ctx, String tag)
-
removeTag
public void removeTag(ContentContext ctx, String tag)
-
getReadRoles
public List<String> getReadRoles(ContentContext ctx)
-
addReadRole
public void addReadRole(ContentContext ctx, String... roles)
-
addReadRole
public void addReadRole(ContentContext ctx, Collection<String> roles)
-
removeReadRole
public void removeReadRole(ContentContext ctx, String role)
-
getDirecotry
public StaticInfo getDirecotry(ContentContext ctx) throws Exception
- Throws:
Exception
-
getVersionHash
public String getVersionHash(ContentContext ctx)
-
getExifDate
public Date getExifDate()
-
getCopyright
public String getCopyright(ContentContext ctx)
-
setCopyright
public void setCopyright(ContentContext ctx, String copyright)
-
getFullHTMLTitle
public String getFullHTMLTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
getFullTitle
public String getFullTitle(ContentContext ctx) throws Exception
- Throws:
Exception
-
canRead
public Boolean canRead(ContentContext ctx, User user, String accessToken)
-
setAccessToken
public void setAccessToken(ContentContext ctx, String token)
-
getAccessToken
public String getAccessToken(ContentContext ctx)
-
getURL
public String getURL(ContentContext ctx) throws IOException
- Throws:
IOException
-
isStaticFolder
public boolean isStaticFolder()
-
setStaticFolder
public void setStaticFolder(boolean staticFolder)
-
toXML
public void toXML(ContentContext ctx, Writer inWrt)
-
fromXML
public void fromXML(ContentContext ctx, NodeXML node)
-
getParent
public StaticInfo getParent(ContentContext ctx) throws Exception
- Throws:
Exception
-
resetImageSize
public void resetImageSize(ContentContext ctx)
-
getImageSize
public ImageSize getImageSize(ContentContext ctx)
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
getContentAsMap
public Map<String,Object> getContentAsMap(ContentContext ctx) throws Exception
- Specified by:
getContentAsMapin interfaceIRestItem- Throws:
Exception
-
-