"executeimmediate": true,\r
"cronexpression": "0 0 0/1 1/1 * ? *",\r
"parameters": [ \r
- {"name": "inputFolder", "value": "/mnt/ISILON/ARCHIVE", "type": "java.lang.String"},\r
- {"name": "globalInputFolder", "value": "\\\\10.10.1.100\\BRAAVOS\\ARCHIVE", "type": "java.lang.String"}\r
+ {"name": "sourcePath", "value": "/mnt/ISILON/ARCHIVE", "type": "java.lang.String"},\r
+ {"name": "globalSourcePath", "value": "\\\\10.10.1.100\\BRAAVOS\\ARCHIVE", "type": "java.lang.String"}\r
]\r
},\r
{\r
{"name": "userName", "value": "MAM", "type": "java.lang.String"},\r
{"name": "password", "value": "Echotv.hu", "type": "java.lang.String"},\r
{"name": "lookupDays", "value": 7, "type": "java.lang.Integer"},\r
- {"name": "outputPath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT", "type": "java.lang.String"}\r
+ {"name": "targetPath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT", "type": "java.lang.String"}\r
+ ]\r
+ }, \r
+ {\r
+ "active": false,\r
+ "name" : "MORPHEUS anyagok visszatöltése",\r
+ "template": "retrieve-morpheus-missing-materials.xml",\r
+ "executeimmediate": true,\r
+ "cronexpression": "0 0 0/1 1/1 * ? *",\r
+ "parameters": [\r
+ {"name": "sourcePath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT\\MORPHEUS", "type": "java.lang.String"},\r
+ {"name": "targetPath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT", "type": "java.lang.String"}\r
]\r
}, \r
{\r
"executeimmediate": true,\r
"cronexpression": "0 0 0/1 1/1 * ? *",\r
"parameters": [ \r
- {"name": "inputFolder", "value": "\\\\10.10.1.100\\BRAAVOS\\ARCHIVE", "type": "java.lang.String"},\r
+ {"name": "sourcePath", "value": "\\\\10.10.1.100\\BRAAVOS\\ARCHIVE", "type": "java.lang.String"},\r
{"name": "userName", "value": "mediacube", "type": "java.lang.String"},\r
{"name": "password", "value": "Broadca5T", "type": "java.lang.String"}\r
]\r
<declarations>\r
<parameters>\r
<parameter name="archiveItem" type="user.jobengine.server.steps.ArchiveItem" />\r
- <parameter name="globalInputFolder" type="java.lang.String"/>\r
+ <parameter name="globalSourcePath" type="java.lang.String"/>\r
</parameters>\r
<variables>\r
<variable name="mediaCubeMedia" type="user.jobengine.db.Media" />\r
<calljobstep id="id3" type="user.jobengine.server.steps.TranscodeSELENIOStep" weight="1">\r
<inputs>\r
<input>\r
- <parameter name="globalInputFolder" />\r
+ <parameter name="globalSourcePath" />\r
</input>\r
<input>\r
<parameter name="archiveItem" />\r
<jobtemplate name="Felhasználói archiválás">\r
<declarations>\r
<parameters>\r
- <parameter name="inputFolder" type="java.lang.String"/>\r
- <parameter name="globalInputFolder" type="java.lang.String"/>\r
+ <parameter name="sourcePath" type="java.lang.String"/>\r
+ <parameter name="globalSourcePath" type="java.lang.String"/>\r
</parameters>\r
<variables>\r
<variable name="archiveList" type="java.util.ArrayList"/>\r
<calljobstep id="step1" type="user.jobengine.server.steps.ArchiveListBuilderStep" weight="1">\r
<inputs>\r
<input>\r
- <parameter name="inputFolder" />\r
+ <parameter name="sourcePath" />\r
</input>\r
</inputs>\r
<outputs>\r
<calljobstep id="step2" type="user.jobengine.server.steps.ArchiveMaterialSubmitStep" weight="1">\r
<inputs>\r
<input>\r
- <parameter name="globalInputFolder" />\r
+ <parameter name="globalSourcePath" />\r
</input>\r
<input>\r
<variable name="archiveList" />\r
<jobtemplate name="Anyagok törlése">\r
<declarations>\r
<parameters>\r
- <parameter name="inputFolder" type="java.lang.String"/>\r
+ <parameter name="sourcePath" type="java.lang.String"/>\r
<parameter name="userName" type="java.lang.String"/>\r
<parameter name="password" type="java.lang.String"/>\r
</parameters>\r
<calljobstep id="id1" type="user.jobengine.server.steps.DeleteMaterialsStep" weight="1">\r
<inputs>\r
<input>\r
- <parameter name="inputFolder" />\r
+ <parameter name="sourcePath" />\r
</input>\r
<input>\r
<parameter name="userName" />\r
<?xml version="1.0" encoding="UTF-8"?>\r
<jobtemplate name="Archivált anyag visszatöltése">\r
<declarations>\r
- <variables>\r
- <variable name="mediaCubeMedia" type="user.jobengine.db.Media" />\r
- <variable name="outputPath" type="java.lang.String" />\r
- </variables>\r
+ <parameters>\r
+ <parameter name="mediaCubeMedia" type="user.jobengine.db.Media" />\r
+ <parameter name="targetPath" type="java.lang.String" />\r
+ <parameter name="targetNamePattern" type="java.lang.String" />\r
+ </parameters>\r
</declarations>\r
<commands>\r
<calljobstep id="id1" type="user.jobengine.server.steps.TSMRestoreStep" weight="1">\r
<parameter name="mediaCubeMedia" />\r
</input>\r
<input>\r
- <parameter name="outputPath" />\r
+ <parameter name="targetPath" />\r
+ </input>\r
+ <input>\r
+ <parameter name="targetNamePattern" />\r
</input>\r
</inputs>\r
</calljobstep>\r
<jobtemplate name="TRAFFIC anyagok visszatöltése">\r
<declarations>\r
<parameters>\r
- <parameter name="inputPath" type="java.lang.String" />\r
- <parameter name="outputPath" type="java.lang.String" />\r
+ <parameter name="sourcePath" type="java.lang.String" />\r
+ <parameter name="targetPath" type="java.lang.String" />\r
</parameters>\r
</declarations>\r
<commands>\r
<calljobstep id="id1" type="user.jobengine.server.steps.CheckMORPHEUSMissingMaterialsStep" weight="1">\r
<inputs>\r
<input>\r
- <parameter name="inputPath" />\r
+ <parameter name="sourcePath" />\r
</input>\r
<input>\r
- <parameter name="outputPath" />\r
+ <parameter name="targetPath" />\r
</input>\r
</inputs>\r
</calljobstep>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<jobtemplate name="Archivált anyag visszatöltése">\r
+ <declarations>\r
+ <parameters>\r
+ <parameter name="mediaCubeMedia" type="user.jobengine.db.Media" />\r
+ <parameter name="houseId" type="java.lang.String" />\r
+ </parameters>\r
+ <variables>\r
+ <variable name="targetPath" type="java.lang.String" />\r
+ <variable name="targetNamePattern" type="java.lang.String" />\r
+ </variables>\r
+ </declarations>\r
+ <commands>\r
+ <calljobstep type="user.jobengine.server.steps.OutputPathAndNameSelectorStep" weight="1">\r
+ <inputs>\r
+ <input>\r
+ <parameter name="mediaCubeMedia" />\r
+ </input>\r
+ <input>\r
+ <parameter name="houseId" />\r
+ </input>\r
+ </inputs>\r
+ <outputs>\r
+ <output>\r
+ <variable name="targetPath" />\r
+ </output>\r
+ <output>\r
+ <variable name="targetNamePattern" />\r
+ </output>\r
+ </outputs> \r
+ </calljobstep>\r
+ <calljobstep type="user.jobengine.server.steps.TSMRestoreStep" weight="1">\r
+ <inputs>\r
+ <input>\r
+ <parameter name="mediaCubeMedia" />\r
+ </input>\r
+ <input>\r
+ <parameter name="targetPath" />\r
+ </input>\r
+ <input>\r
+ <parameter name="targetNamePattern" />\r
+ </input>\r
+ </inputs>\r
+ </calljobstep>\r
+ </commands>\r
+</jobtemplate>
\ No newline at end of file
<parameter name="userName" type="java.lang.String" />\r
<parameter name="password" type="java.lang.String" />\r
<parameter name="lookupDays" type="java.lang.Integer" />\r
- <parameter name="outputPath" type="java.lang.String" />\r
+ <parameter name="targetPath" type="java.lang.String" />\r
</parameters>\r
</declarations>\r
<commands>\r
<parameter name="lookupDays" />\r
</input>\r
<input>\r
- <parameter name="outputPath" />\r
+ <parameter name="targetPath" />\r
</input>\r
</inputs>\r
</calljobstep>\r
}\r
\r
@StepEntry\r
- public Object[] execute(String inputFolder, IJobEngine jobEngine, IJobRuntime jobRuntime) {\r
+ public Object[] execute(String sourcePath, IJobEngine jobEngine, IJobRuntime jobRuntime) {\r
List<ArchiveItem> archiveList = new ArrayList<ArchiveItem>();\r
DirectoryStream<Path> directoryStream = null;\r
try {\r
- Files.newDirectoryStream(Paths.get(inputFolder)).forEach(p -> processPathItem(p, archiveList));\r
+ Files.newDirectoryStream(Paths.get(sourcePath)).forEach(p -> processPathItem(p, archiveList));\r
} catch (Exception e) {\r
logger.error("", e);\r
} finally {\r
*/\r
public class ArchiveMaterialSubmitStep extends JobStep {\r
private static final String ARCHIVE = "Archiválás";\r
- private static final String GLOBAL_INPUT_FOLDER = "globalInputFolder";\r
+ private static final String GLOBAL_SOURCE_PATH = "globalSourcePath";\r
private static final Logger logger = LogManager.getLogger();\r
private static final String JOBTEMPLATE = "archive-material.xml";\r
private static final String ARCHIVE_ITEM = "archiveItem";\r
\r
@StepEntry\r
- public Object[] execute(String globalInputFolder, ArrayList<ArchiveItem> archiveList, IJobEngine jobEngine, IJobRuntime jobRuntime) {\r
+ public Object[] execute(String globalSourcePath, ArrayList<ArchiveItem> archiveList, IJobEngine jobEngine, IJobRuntime jobRuntime) {\r
try {\r
for (ArchiveItem archiveItem : archiveList) {\r
try {\r
IJobRuntime submit = jobEngine.submit(JOBTEMPLATE, ARCHIVE,\r
- ListUtils.asMap(ARCHIVE_ITEM, archiveItem, GLOBAL_INPUT_FOLDER, globalInputFolder));\r
+ ListUtils.asMap(ARCHIVE_ITEM, archiveItem, GLOBAL_SOURCE_PATH, globalSourcePath));\r
} catch (Exception e) {\r
if (archiveItem != null)\r
archiveItem.removeCatchedFile();\r
private static final String MEDIA_CUBE_MEDIA = "mediaCubeMedia";\r
private static final String JOBTEMPLATE = "retrieve-material.xml";\r
private static final String CSV_EXT = ".csv";\r
- private String outputPath;\r
+ private String targetPath;\r
private MediaFileDAO dao;\r
private IJobEngine jobEngine;\r
\r
@StepEntry\r
- public Object[] execute(String inputPath, String outputPath, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
- setAndCheck(inputPath, outputPath, jobEngine);\r
+ public Object[] execute(String sourcePath, String targetPath, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
+ setAndCheck(sourcePath, targetPath, jobEngine);\r
DirectoryStream<Path> directoryStream = null;\r
try {\r
- Files.newDirectoryStream(Paths.get(inputPath)).forEach(p -> processPathItem(p));\r
+ Files.newDirectoryStream(Paths.get(sourcePath)).forEach(p -> processPathItem(p));\r
} catch (Exception e) {\r
logger.error("", e);\r
} finally {\r
return;\r
}\r
\r
- jobEngine.submit(JOBTEMPLATE, RETRIEVE_MATERIAL, ListUtils.asMap(MEDIA_CUBE_MEDIA, medias.get(0), OUTPUT_PATH, outputPath));\r
+ jobEngine.submit(JOBTEMPLATE, RETRIEVE_MATERIAL, ListUtils.asMap(MEDIA_CUBE_MEDIA, medias.get(0), OUTPUT_PATH, targetPath));\r
}\r
\r
private void processMissingMaterialCSV(Path csvFilePath) throws Exception {\r
logger.error(getMarker(), "A {} MORPHEUS állomány nem törölhető.", csvFile.getName());\r
}\r
\r
- private void setAndCheck(String inputPath, String outputPath, IJobEngine jobEngine) {\r
+ private void setAndCheck(String sourcePath, String targetPath, IJobEngine jobEngine) {\r
if (jobEngine == null) {\r
logger.error(getMarker(), "Az folyamatkezelő réteg nem elérhető.");\r
throw new NullPointerException("Internal error, missing JobEngine reference.");\r
logger.error(getMarker(), "Az adatbáziskezelő réteg MediaFile kezelöje nem elérhető.");\r
throw new NullPointerException("Internal error, missing MediaFile DAO reference.");\r
}\r
- if (inputPath == null) {\r
- logger.error(getMarker(), "A folyamat 'inputPath' bemeneti paramétere üres.");\r
- throw new NullPointerException("System is not configured properly, 'inputPath' input parameter missing.");\r
+ if (sourcePath == null) {\r
+ logger.error(getMarker(), "A folyamat 'sourcePath' bemeneti paramétere üres.");\r
+ throw new NullPointerException("System is not configured properly, 'sourcePath' input parameter missing.");\r
}\r
- if (outputPath == null) {\r
- logger.error(getMarker(), "A folyamat 'outputPath' bemeneti paramétere üres.");\r
- throw new NullPointerException("System is not configured properly, 'outputPath' input parameter missing.");\r
+ if (targetPath == null) {\r
+ logger.error(getMarker(), "A folyamat 'targetPath' bemeneti paramétere üres.");\r
+ throw new NullPointerException("System is not configured properly, 'targetPath' input parameter missing.");\r
}\r
- this.outputPath = outputPath;\r
+ this.targetPath = targetPath;\r
}\r
\r
}\r
private static final String JOBTEMPLATE = "retrieve-material.xml";\r
\r
@StepEntry\r
- public Object[] execute(String dbUrl, String userName, String password, int lookupDays, String outputPath, IJobEngine jobEngine, IJobRuntime jobRuntime)\r
+ public Object[] execute(String dbUrl, String userName, String password, int lookupDays, String targetPath, IJobEngine jobEngine, IJobRuntime jobRuntime)\r
throws Exception {\r
\r
try (Connection con = getConnection(dbUrl, userName, password); PreparedStatement stmt = con.prepareStatement(SQL)) {\r
continue;\r
\r
try {\r
- processTrafficId(trafficId, outputPath, jobEngine);\r
+ processTrafficId(trafficId, targetPath, jobEngine);\r
} catch (Exception e) {\r
logger.error(getMarker(), "Hiba lépett fel az {} anyag visszatöltéskor. A rendszer hibaüzenete: {}", trafficId, e.getMessage());\r
}\r
return result;\r
}\r
\r
- private void processTrafficId(String trafficId, String outputPath, IJobEngine jobEngine) throws Exception {\r
+ private void processTrafficId(String trafficId, String targetPath, IJobEngine jobEngine) throws Exception {\r
IItemManager manager = jobEngine.getItemManager();\r
MediaFileDAO dao = (MediaFileDAO) manager.getBaseDAO(MediaFile.class);\r
List<IEntityBase> medias = dao.getByHouseId(trafficId);\r
}\r
\r
String title = "Traffic adásanyag visszatöltés: " + trafficId;\r
- jobEngine.submit(JOBTEMPLATE, title, ListUtils.asMap(MEDIA_CUBE_MEDIA, medias.get(0), OUTPUT_PATH, outputPath));\r
+ jobEngine.submit(JOBTEMPLATE, title, ListUtils.asMap(MEDIA_CUBE_MEDIA, medias.get(0), OUTPUT_PATH, targetPath));\r
}\r
\r
}\r
private StoreUri sourceUri;\r
\r
@StepEntry\r
- public Object[] execute(String inputFolder, String userName, String password, IJobEngine jobEngine, IJobRuntime jobRuntime) {\r
- if (StringUtils.isBlank(inputFolder)) {\r
- logger.error(getMarker(), "A folyamat 'inputFolder' bemeneti paramétere üres.");\r
- throw new NullPointerException("System is not configured properly, 'inputFolder' input parameter missing.");\r
+ public Object[] execute(String sourceFolder, String userName, String password, IJobEngine jobEngine, IJobRuntime jobRuntime) {\r
+ if (StringUtils.isBlank(sourceFolder)) {\r
+ logger.error(getMarker(), "A folyamat 'sourceFolder' bemeneti paramétere üres.");\r
+ throw new NullPointerException("System is not configured properly, 'sourceFolder' input parameter missing.");\r
}\r
IItemManager manager = jobEngine.getItemManager();\r
- sourceUri = manager.createStoreUri(RemoteStoreProtocol.SMB, inputFolder);\r
+ sourceUri = manager.createStoreUri(RemoteStoreProtocol.SMB, sourceFolder);\r
sourceUri.setUserName(userName);\r
sourceUri.setPassword(password);\r
try {\r
public class TSMBackupStep extends JobStep {\r
private static final Logger logger = LogManager.getLogger();\r
private IItemManager manager;\r
- private Path inputMediaFile;\r
+ private Path sourceMediaFile;\r
private Store tsmStore;\r
private StoreUri targetUri;\r
private FileType fileType;\r
try {\r
setAndCheck(archiveItem, mediaCubeMedia, jobEngine);\r
\r
- StoreUri sourceUri = manager.createStoreUri(RemoteStoreProtocol.LOCAL, inputMediaFile.getParent().toString());\r
+ StoreUri sourceUri = manager.createStoreUri(RemoteStoreProtocol.LOCAL, sourceMediaFile.getParent().toString());\r
\r
final IJobRuntime runtime = jobRuntime;\r
sourceUri.addProgressListener(new IProgressEventListener() {\r
evt.setCancel(!canContinue());\r
}\r
});\r
- String sourceFileName = inputMediaFile.toFile().getName();\r
+ String sourceFileName = sourceMediaFile.toFile().getName();\r
RemoteFile remoteFile = sourceUri.transferFrom(targetUri, sourceFileName, sourceFileName);\r
\r
String name = getHouseId(archiveItem);\r
logger.error(getMarker(), "A folyamat 'archiveItem' bemeneti paramétere üres.");\r
throw new NullPointerException("System is not configured properly, missing 'archiveItem' input parameter.");\r
}\r
- inputMediaFile = archiveItem.getMediaFile();\r
- if (inputMediaFile == null) {\r
+ sourceMediaFile = archiveItem.getMediaFile();\r
+ if (sourceMediaFile == null) {\r
logger.error(getMarker(), "A folyamat 'archiveItem' bemeneti paraméter 'mediaFile' értéke üres.");\r
throw new NullPointerException("System is not configured properly, missing 'mediaFile' value in 'archiveItem' input parameter.");\r
}\r
- if (!inputMediaFile.toFile().exists()) {\r
- logger.error(getMarker(), "Az {} állomány nem létezik vagy nem érhető el.", inputMediaFile.toFile().getName());\r
- throw new IOException(String.format("Input file {} not exists or unreachable.", inputMediaFile.toFile().getName()));\r
+ if (!sourceMediaFile.toFile().exists()) {\r
+ logger.error(getMarker(), "Az {} állomány nem létezik vagy nem érhető el.", sourceMediaFile.toFile().getName());\r
+ throw new IOException(String.format("Input file {} not exists or unreachable.", sourceMediaFile.toFile().getName()));\r
}\r
tsmStore = manager.getSystemStore(false);\r
if (tsmStore == null) {\r
private String sourceFileName;\r
\r
@StepEntry\r
- public Object[] execute(Media mediaCubeMedia, String outputPath, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
- setAndCheck(mediaCubeMedia, outputPath, jobEngine);\r
+ public Object[] execute(Media mediaCubeMedia, String targetPath, String targetNamePattern, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
+ setAndCheck(mediaCubeMedia, targetPath, targetNamePattern, jobEngine);\r
try {\r
//TODO check file existance?\r
final IJobRuntime runtime = jobRuntime;\r
evt.setCancel(!canContinue());\r
}\r
});\r
- RemoteFile result = sourceUri.transferFrom(targetUri, sourceFileName, sourceFileName);\r
+ String targetFileName = String.format(targetNamePattern, sourceFileName);\r
+ RemoteFile result = sourceUri.transferFrom(targetUri, sourceFileName, targetFileName);\r
} catch (Exception e) {\r
logger.error(getMarker(), "A {} állomány visszatöltése sikertelen. A rendszer hibaüzenete: {}", sourceFileName, e.getMessage());\r
logger.catching(e);\r
return null;\r
}\r
\r
- private void setAndCheck(Media mediaCubeMedia, String outputPath, IJobEngine jobEngine) {\r
+ private void setAndCheck(Media mediaCubeMedia, String targetPath, String targetNamePattern, IJobEngine jobEngine) {\r
if (jobEngine == null) {\r
logger.error(getMarker(), "Az folyamatkezelő réteg nem elérhető.");\r
throw new NullPointerException("Internal error, missing JobEngine reference.");\r
logger.error(getMarker(), "A folyamat 'mediaCubeMedia' bemeneti paramétere üres.");\r
throw new NullPointerException("System is not configured properly, 'mediaCubeMedia' input parameter missing.");\r
}\r
- if (StringUtils.isBlank(outputPath)) {\r
- logger.error(getMarker(), "A folyamat 'inputFolder' bemeneti paramétere üres.");\r
- throw new NullPointerException("System is not configured properly, 'inputFolder' input parameter missing.");\r
+ if (StringUtils.isBlank(targetPath)) {\r
+ logger.error(getMarker(), "A folyamat 'targetPath' bemeneti paramétere üres.");\r
+ throw new NullPointerException("System is not configured properly, 'targetPath' input parameter missing.");\r
+ }\r
+ if (StringUtils.isBlank(targetNamePattern)) {\r
+ logger.error(getMarker(), "A folyamat 'targetNamePattern' bemeneti paramétere üres.");\r
+ throw new NullPointerException("System is not configured properly, 'targetNamePattern' input parameter missing.");\r
}\r
Store tsmStore = manager.getSystemStore(false);\r
if (tsmStore == null) {\r
logger.error(getMarker(), "A TSM rendszer beállítás paraméterei nem elérhetőek.");\r
throw new NullPointerException("System is not configured properly, missing TSM StoreUri.");\r
}\r
- targetUri = manager.createStoreUri(RemoteStoreProtocol.LOCAL, outputPath);\r
+ targetUri = manager.createStoreUri(RemoteStoreProtocol.LOCAL, targetPath);\r
sourceFileName = getSourceFileName(mediaCubeMedia, tsmStore);\r
if (sourceFileName == null) {\r
logger.error(getMarker(), "Adatbázis bejegyzés hiba, a visszatöltendő fájl neve nem található.");\r
}\r
}\r
\r
- private TranscodeRequest buildTranscodeRequest(String projectFilePath, String sourceFilePath, String outputPath) throws java.lang.Exception {\r
+ private TranscodeRequest buildTranscodeRequest(String projectFilePath, String sourceFilePath, String targetPath) throws java.lang.Exception {\r
Clip clip = new Clip();\r
MediaFile mediaFile = new MediaFile();\r
mediaFile.setFile(sourceFilePath);\r
TranscodeDestination transcodeDestination = new TranscodeDestination();\r
\r
//transcodeDestination.setOutputWriteDirectory(outputPath);\r
- transcodeDestination.setOutputPostMoveDirectory(outputPath);\r
+ transcodeDestination.setOutputPostMoveDirectory(targetPath);\r
transcodeRequest.setTranscodeDestination(transcodeDestination);\r
return transcodeRequest;\r
}\r
<body>\r
\r
<%if(!"".equals(mediaURL) && !mediaURL.endsWith("empty.zul")){%>\r
- <video id="myVideoDiv" class="video-js" controls preload="auto" poster="/zk/img/media_poster.png" data-setup="{}">\r
+ <video id="myVideoDiv" class="video-js" controls preload="auto" data-setup="{}">\r
<source src="<%=mediaURL%>" type='video/mp4'>\r
<!--source src="/zk/media_oceans.mp4" type='video/mp4' -->\r
<!--source src="MY_VIDEO.webm" type='video/webm' -->\r
</groupbox>\r
\r
<groupbox vflex="true" closable="false">\r
- <caption sclass="boldfont" label="Találatok" />\r
- <listbox id="itemResults" model="@load(svm.searchResult)" multiple="false" autopaging="true" mold="paging" vflex="true"\r
+ <caption sclass="boldfont" label="Gyűjtők" />\r
+ <listbox id="itemResults" sizedByContent="false" span="true" model="@load(svm.searchResult)" multiple="false" autopaging="true" mold="paging" vflex="true"\r
selectedItem="@bind(svm.selectedItem)" style="border: none; background: #e3e3e3 !important;" oddRowSclass="listbox-odd-style"\r
sclass="listbox-normal-style">\r
- <listhead>\r
- <listheader label="Id" width="70px" sort="auto(id)" align="left" />\r
- <listheader label="Cím" width="120px" sort="auto(status)" align="left" />\r
- <listheader label="Leírás" width="120px" sort="auto(tipus)" align="left" />\r
+ <listhead sizable="true">\r
+ <listheader label="ID" hflex="min" align="left" />\r
+ <listheader label="Cím" align="left" />\r
</listhead>\r
-\r
<template name="model">\r
<listitem>\r
- <listcell label="@load(each.id)" />\r
+ <listcell label="@load(each.houseId)" />\r
<listcell label="@load(each.title)" />\r
- <listcell label="@load(each.description)" />\r
</listitem>\r
</template>\r
</listbox>\r
</groupbox>\r
\r
<groupbox vflex="true" closable="false">\r
- <caption sclass="boldfont" label="Kapcsolódó anyagok" />\r
+ <caption sclass="boldfont" label="Anyagok" />\r
\r
- <listbox id="mediaList" onSelect="@command('onSelectMedia', media=event.reference.value)" model="@load(svm.selectedItem.medias)"\r
+ <listbox id="mediaList" sizedByContent="false" span="true" onSelect="@command('onSelectMedia', media=event.reference.value)" model="@load(svm.selectedItem.medias)"\r
multiple="false" vflex="true" selectedItem="@bind(svm.selectedMedia)" style="border: none; background: #e3e3e3 !important;"\r
oddRowSclass="listbox-odd-style" sclass="listbox-normal-style">\r
- <listhead>\r
- <listheader label="Id" width="70px" sort="auto(id)" align="left" />\r
- <listheader label="Cím" width="120px" sort="auto(status)" align="left" />\r
- <listheader label="Leírás" width="120px" sort="auto(tipus)" align="left" />\r
+ <listhead sizable="true">\r
+ <listheader label="ID" hflex="min" align="left" />\r
+ <listheader label="Cím" align="left" />\r
</listhead>\r
-\r
<template name="model">\r
<listitem>\r
- <listcell label="@load(each.id)" />\r
+ <listcell label="@load(each.houseId)" />\r
<listcell label="@load(each.title)" />\r
- <listcell label="@load(each.description)" />\r
</listitem>\r
</template>\r
</listbox>\r
<center border="none">\r
\r
<borderlayout height="100%" width="100%">\r
- <north border="none" size="90%" splittable="true">\r
+ <north border="none" size="60%" splittable="true">\r
<div align="center" height="100%" width="100%" visible="@load(svm.hasLowresMediaFile)">\r
- <label value="@bind(svm.selectedMedia.description)" />\r
+<!-- <label value="@bind(svm.selectedMedia.description)" /> -->\r
<iframe id="mediaPlayer" height="100%" width="100%" autohide="false" src="@load(svm.lowresMediaFilePath)"></iframe>\r
</div>\r
</north>\r
- <south border="none" size="10%">\r
- <div align="center" height="100%" width="100%" visible="@load(svm.hasTSMMediaFile)">\r
+ <south border="none" size="40%" visible="@load(svm.hasLowresMediaFile)" >\r
+ <window title="@load(svm.selectedItem.title)" contentStyle="overflow:auto;">\r
+ <grid style="overflow: scroll;">\r
+ <rows>\r
+ <row visible="@load(svm.selectedItem.description)">\r
+ <label style="font-size:8pt" value="Anyag leírása" />\r
+ <label value="@load(svm.selectedItem.description)" />\r
+ </row>\r
+ </rows>\r
+ </grid>\r
<button label="Visszatöltés" onClick="@command('downloadMedia')" autodisable="self" disabled="@load(not svm.hasTSMMediaFile)"\r
sclass="buttonboldfont" />\r
- </div>\r
+ </window> \r
</south>\r
</borderlayout>\r
\r
import user.jobengine.server.JobEngine;\r
\r
/**\r
- Cachelt modell nagy listakhoz.\r
- Cacheli a dokumentumokat a megadott meretben.\r
- Az utoljara elkert index +- cacheSize/2\r
-*/\r
+ * Cachelt modell nagy listakhoz. Cacheli a dokumentumokat a megadott meretben. Az utoljara elkert index +- cacheSize/2\r
+ */\r
public class CachedListModel extends ListModelList<Item> {\r
private static final Logger logger = LogManager.getLogger();\r
private int cacheSize = 500;\r
reinit();\r
}\r
\r
- //kintrol is hivhatjak\r
- public void reinit() {\r
+ //load cache event\r
+ public void addEventListener(EventListener listener) {\r
+ eventListenerList.add(listener);\r
+ }\r
+\r
+ public void clearAndReset() {\r
+ this.resultSetSize = -1;\r
this.resultSetSize = -1;\r
this.cacheStart = 0;\r
this.cacheEnd = 0;\r
+\r
clearCache();\r
}\r
\r
+ public void clearCache() {\r
+ cache.clear();\r
+ cache.clear();\r
+ docSelection.clear();\r
+ }\r
+\r
+ public void fireListEvent() {\r
+ clearCache();\r
+ fireEvent(ListDataEvent.STRUCTURE_CHANGED, -1, -1);\r
+ }\r
+\r
+ private void fireLoadCacheEvent() {\r
+ Event evt = new Event(Events.ON_SCROLL);\r
+ for (EventListener el : eventListenerList) {\r
+ try {\r
+ el.onEvent(evt);\r
+ } catch (Exception e) {\r
+ logger.error("", e);\r
+ }\r
+ }\r
+ }\r
+\r
+ public int getCacheEnd() {\r
+ return cacheEnd;\r
+ }\r
+\r
+ //zul felulet hasznalja kiirashoz\r
+ public int getCacheStart() {\r
+ return cacheStart;\r
+ }\r
+\r
+ public int getDocSelectionCount() {\r
+ return docSelection.size();\r
+ }\r
+\r
@Override\r
public Item getElementAt(int index) {\r
//logger.debug("CachedListMode.getElementAt(): " + index);\r
return ret;\r
}\r
\r
- //zul felulet hasznalja kiirashoz \r
- public int getCacheStart() {\r
- return cacheStart;\r
- }\r
-\r
- public int getCacheEnd() {\r
- return cacheEnd;\r
- }\r
-\r
//ListModelList method felulirva\r
//after 1. search ++++++++++\r
@Override\r
\r
//DO SEARCH for startPos, endPos\r
//SearchResult sr = loadFakeItems(startPos, endPos);\r
- SearchResult sr = this.itemManager.searchItem(searchValue, startPos, endPos);\r
+ SearchResult sr = this.itemManager.searchItem(searchValue + "*", startPos, endPos);\r
\r
if (sr != null) {\r
if (this.resultSetSize < 0) {\r
}\r
}\r
\r
- public void clearCache() {\r
- cache.clear();\r
- cache.clear();\r
- docSelection.clear();\r
- }\r
-\r
- public void fireListEvent() {\r
- clearCache();\r
- fireEvent(ListDataEvent.STRUCTURE_CHANGED, -1, -1);\r
- }\r
-\r
- public void clearAndReset() {\r
- this.resultSetSize = -1;\r
- this.resultSetSize = -1;\r
- this.cacheStart = 0;\r
- this.cacheEnd = 0;\r
-\r
- clearCache();\r
- }\r
-\r
- //load cache event\r
- public void addEventListener(EventListener listener) {\r
- eventListenerList.add(listener);\r
- }\r
-\r
- private void fireLoadCacheEvent() {\r
- Event evt = new Event(Events.ON_SCROLL);\r
- for (EventListener el : eventListenerList) {\r
- try {\r
- el.onEvent(evt);\r
- } catch (Exception e) {\r
- logger.error("", e);\r
- }\r
- }\r
- }\r
-\r
- public int getDocSelectionCount() {\r
- return docSelection.size();\r
- }\r
-\r
//TEST CODE\r
private SearchResult loadFakeItems(int start, int end) {\r
SearchResult sr = new SearchResult();\r
return sr;\r
}\r
\r
+ //kintrol is hivhatjak\r
+ public void reinit() {\r
+ this.resultSetSize = -1;\r
+ this.cacheStart = 0;\r
+ this.cacheEnd = 0;\r
+ clearCache();\r
+ }\r
+\r
}
\ No newline at end of file