|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectza.org.coefficient.modules.BaseModule
za.org.coefficient.modules.BaseProjectModule
za.org.coefficient.modules.fileUpload.FileUpload
public class FileUpload
Field Summary | |
---|---|
private static int |
sizeKb
|
private static int |
sizeMb
|
Constructor Summary | |
---|---|
FileUpload()
|
Method Summary | |
---|---|
void |
addEntity(CoefficientContext ctx,
Project project)
|
void |
browse(CoefficientContext ctx,
Project project,
boolean showScreen)
|
java.lang.String |
canExecuteForRole(CoefficientContext ctx,
java.lang.String methodName,
Role usersHighestRole)
This is a base implementation that will allow all methods to be invoked without regard to roles |
CoefficientContext |
createRootFolderItemIfNotExist(CoefficientContext ctx)
This is a workflow utility method |
CoefficientContext |
deleteAllForProject(CoefficientContext ctx)
|
void |
deleteEntity(CoefficientContext ctx,
Project project)
|
void |
deleteFile(CoefficientContext ctx,
Project project)
|
private void |
deleteProjectFolder(java.lang.Long ID)
|
private void |
deleteProjectFolderItem(java.lang.Long ID)
|
void |
editEntity(CoefficientContext ctx,
Project project)
|
private java.util.List |
filterRoles(CoefficientUser user,
java.util.List roles,
Project project)
|
int |
getAllUploadsSize(CoefficientContext ctx)
|
private java.lang.String |
getFullPathForFolder(ProjectFolder folder,
java.lang.String path)
method to recursively get the full pathname of a projectfolder |
java.lang.String |
getMainMethod()
This method is used to determine which method should be invoked when the module is requested without an operation. |
java.lang.String |
getModuleDescription()
This method is used to find the description of the module |
java.lang.String |
getModuleDisplayName()
This method is used to find the display name of the module |
java.lang.Long |
getRootFolderId(CoefficientContext ctx)
This is a workflow utility method |
java.lang.String |
getSizeString(int fileSize)
To get a string describing the size of a file |
java.lang.String |
getSummaryForProject(CoefficientContext ctx)
|
FileDownloadData |
getUpload(CoefficientContext ctx)
|
java.lang.String |
getUploadVersionString(ProjectUpload upload)
|
boolean |
hasCurrentUpload(CoefficientContext ctx)
This is a workflow utility method |
CoefficientContext |
interpretAction(CoefficientContext ctx)
|
private boolean |
isUserAllowed(CoefficientContext ctx,
long maxAllowedRole)
|
void |
setCurrent(CoefficientContext ctx,
Project project)
|
protected CoefficientContext |
showFileSelectScreen(CoefficientContext ctx)
|
void |
showItem(CoefficientContext ctx,
Project project)
|
CoefficientContext |
showSummaryForProject(CoefficientContext ctx)
|
private java.lang.String |
trimToOneDecimalPlace(java.lang.String floatString)
|
CoefficientContext |
unsetCurrentUpload(CoefficientContext ctx)
This is a workflow utility method |
void |
uploadFile(CoefficientContext ctx,
Project project)
|
Methods inherited from class za.org.coefficient.modules.BaseModule |
---|
createRSSItem, displayUsersData, getCoefficientContext, getModuleName, isProjectRequired, publishEvent, setCoefficientContext, showHelp |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int sizeKb
private static final int sizeMb
Constructor Detail |
---|
public FileUpload()
Method Detail |
---|
public java.lang.String getMainMethod()
ModuleLocal
getMainMethod
in interface ModuleLocal
getMainMethod
in class BaseModule
public java.lang.String getModuleDescription()
ModuleLocal
getModuleDescription
in interface ModuleLocal
getModuleDescription
in class BaseModule
public java.lang.String getModuleDisplayName()
ModuleLocal
getModuleDisplayName
in interface ModuleLocal
getModuleDisplayName
in class BaseModule
public java.lang.String getSummaryForProject(CoefficientContext ctx) throws java.lang.Exception
getSummaryForProject
in class BaseProjectModule
java.lang.Exception
public CoefficientContext showSummaryForProject(CoefficientContext ctx) throws java.lang.Exception
showSummaryForProject
in class BaseProjectModule
java.lang.Exception
public int getAllUploadsSize(CoefficientContext ctx) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public void setCurrent(CoefficientContext ctx, Project project) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public java.lang.Long getRootFolderId(CoefficientContext ctx) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public java.lang.String getSizeString(int fileSize)
public FileDownloadData getUpload(CoefficientContext ctx)
public java.lang.String getUploadVersionString(ProjectUpload upload)
public void addEntity(CoefficientContext ctx, Project project)
public void browse(CoefficientContext ctx, Project project, boolean showScreen)
public java.lang.String canExecuteForRole(CoefficientContext ctx, java.lang.String methodName, Role usersHighestRole)
BaseModule
canExecuteForRole
in interface ModuleLocal
canExecuteForRole
in class BaseModule
public CoefficientContext createRootFolderItemIfNotExist(CoefficientContext ctx) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public CoefficientContext deleteAllForProject(CoefficientContext ctx) throws java.io.IOException
deleteAllForProject
in class BaseProjectModule
java.io.IOException
public void deleteEntity(CoefficientContext ctx, Project project) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public void deleteFile(CoefficientContext ctx, Project project)
public void editEntity(CoefficientContext ctx, Project project) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public boolean hasCurrentUpload(CoefficientContext ctx) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public CoefficientContext interpretAction(CoefficientContext ctx) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public void showItem(CoefficientContext ctx, Project project)
public CoefficientContext unsetCurrentUpload(CoefficientContext ctx) throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public void uploadFile(CoefficientContext ctx, Project project)
protected CoefficientContext showFileSelectScreen(CoefficientContext ctx)
private java.lang.String getFullPathForFolder(ProjectFolder folder, java.lang.String path)
private boolean isUserAllowed(CoefficientContext ctx, long maxAllowedRole)
private void deleteProjectFolder(java.lang.Long ID) throws net.sf.hibernate.HibernateException, java.io.IOException
net.sf.hibernate.HibernateException
java.io.IOException
private void deleteProjectFolderItem(java.lang.Long ID) throws net.sf.hibernate.HibernateException, java.io.IOException
net.sf.hibernate.HibernateException
java.io.IOException
private java.util.List filterRoles(CoefficientUser user, java.util.List roles, Project project)
private java.lang.String trimToOneDecimalPlace(java.lang.String floatString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |