1 13 20 package org.jahia.services.fields; 21 22 import org.jahia.data.JahiaDOMObject; 23 import org.jahia.data.JahiaData; 24 import org.jahia.data.fields.JahiaField; 25 import org.jahia.data.fields.JahiaFieldDefinition; 26 import org.jahia.data.fields.JahiaFieldSet; 27 import org.jahia.exceptions.JahiaException; 28 import org.jahia.params.ParamBean; 29 import org.jahia.services.JahiaService; 30 import org.jahia.services.usermanager.JahiaUser; 31 import org.jahia.services.version.ActivationTestResults; 32 import org.jahia.services.version.EntryLoadRequest; 33 import org.jahia.services.version.JahiaSaveVersion; 34 import org.jahia.services.version.StateModificationContext; 35 import org.jahia.utils.xml.XMLSerializationOptions; 36 import org.jahia.utils.xml.XmlWriter; 37 38 import java.io.IOException ; 39 import java.util.Map ; 40 import java.util.Set ; 41 import java.util.SortedSet ; 42 import java.util.Vector ; 43 44 public abstract class JahiaFieldService extends JahiaService { 45 46 69 public abstract JahiaField createJahiaField (int ID, 70 int jahiaID, 71 int pageID, 72 int ctnid, 73 int fieldDefID, 74 int fieldType, 75 int connectType, 76 String fieldValue, 77 int rank, 78 int aclID, 79 int versionID, 80 int workflowState, 81 String languageCode) 82 throws JahiaException; 83 84 public abstract JahiaField createJahiaField (int ID, 85 int jahiaID, 86 int pageID, 87 int ctnid, 88 int fieldDefID, 89 int fieldType, 90 int connectType, 91 String fieldValue, 92 int rank, 93 int aclID) 94 throws JahiaException; 95 96 103 public abstract void cloneField (int fieldID, int newPageID, 104 int parentAclID, 105 ParamBean jParams) 106 throws JahiaException; 107 108 117 public abstract JahiaField cloneField (JahiaField theField, int newctnid, 118 int newPageID, 119 int parentAclID, 120 boolean childrenCloned) 121 throws JahiaException; 122 123 130 public abstract JahiaFieldSet buildFieldStructureForPage (JahiaData jData, 131 EntryLoadRequest loadVersion) 132 throws JahiaException; 133 134 141 public abstract Vector getNonContainerFieldIDsInPage (int pageID) 142 throws JahiaException; 143 144 152 public abstract Vector getNonContainerFieldIDsInPageByWorkflowState (int 153 pageID, 154 EntryLoadRequest loadVersion) 155 throws JahiaException; 156 157 170 public abstract SortedSet getNonContainerFieldEntryStateInPage (int pageID) 171 throws JahiaException; 172 173 181 public abstract Vector getPagefieldIDsInPage (int pageID) 182 throws JahiaException; 183 184 192 public abstract int getFieldID (String fieldName, int pageID) 193 throws JahiaException; 194 195 200 public abstract Vector getAllFieldIDs () 201 throws JahiaException; 202 203 210 public abstract Vector getAllFieldIDs (int siteID) 211 throws JahiaException; 212 213 219 public abstract Vector getAllFieldDefinitionIDs () 220 throws JahiaException; 221 222 231 237 238 250 public abstract JahiaField loadField (int fieldID, int loadFlag) 251 throws JahiaException; 252 253 265 public abstract JahiaField loadField (int fieldID, ParamBean jParams) 266 throws JahiaException; 267 268 279 public abstract JahiaField loadField (int fieldID, int loadFlag, 280 ParamBean jParams) 281 throws JahiaException; 282 283 public abstract JahiaField loadField (int fieldID, int loadFlag, 284 ParamBean jParams, 285 EntryLoadRequest loadVersion) 286 throws JahiaException; 287 288 296 299 307 public abstract void saveField (JahiaField theField, int parentAclID, 308 ParamBean jParams) 309 throws JahiaException; 310 311 316 public abstract void deleteField (int fieldID, ParamBean jParams) 317 throws JahiaException; 318 319 322 public abstract ActivationTestResults activateStagedFields ( 323 Set languageCodes, 324 int pageID, 325 JahiaUser user, JahiaSaveVersion saveVersion, 326 ParamBean jParams, StateModificationContext stateModifContext) 327 throws JahiaException; 328 329 340 public abstract void markPageFieldsLanguageForDeletion (int pageID, 341 JahiaUser user, 342 String languageCode, 343 StateModificationContext 344 stateModifContext) 345 throws JahiaException; 346 347 362 public abstract ActivationTestResults areFieldsValidForActivation ( 363 Set languageCodes, 364 int pageID, 365 JahiaUser user, 366 JahiaSaveVersion saveVersion, 367 ParamBean jParams, 368 StateModificationContext stateModifContext) 369 throws JahiaException; 370 371 388 public abstract ActivationTestResults 389 areNonContainerFieldsValidForActivation ( 390 Set languageCodes, 391 int pageID, 392 JahiaUser user, 393 JahiaSaveVersion saveVersion, 394 ParamBean jParams, 395 StateModificationContext stateModifContext) 396 throws JahiaException; 397 398 412 public abstract Map getFieldsLanguagesState (int pageID) 413 throws JahiaException; 414 415 431 public abstract void setFieldsLanguageStates ( 432 Set languageCodes, 433 int newWorkflowState, 434 int pageID, 435 ParamBean jParams, 436 StateModificationContext stateModifContext) 437 throws JahiaException; 438 439 448 public abstract JahiaFieldDefinition loadFieldDefinition (int defID) 449 throws JahiaException; 450 451 464 public abstract JahiaFieldDefinition loadFieldDefinition (int siteID, 465 String definitionName) 466 throws JahiaException; 467 468 475 public abstract void saveFieldDefinition (JahiaFieldDefinition theDef) 476 throws JahiaException; 477 478 483 public abstract void deleteFieldDefinition (int fieldDefID) 484 throws JahiaException; 485 486 494 public abstract JahiaDOMObject getFieldsAsDOM (int siteID) 495 throws JahiaException; 496 497 505 public abstract JahiaDOMObject getFieldDefsAsDOM (int siteID) 506 throws JahiaException; 507 508 516 public abstract JahiaDOMObject getFieldDefPropsAsDOM (int siteID) 517 throws JahiaException; 518 519 528 public abstract Vector getAclIDs (int siteID) 529 throws JahiaException; 530 531 549 public abstract void serializeNonContainerFieldsToXML (XmlWriter xmlWriter, 550 XMLSerializationOptions xmlSerializationOptions, int pageID, 551 ParamBean paramBean) 552 throws IOException ; 553 554 562 public abstract String composeFieldDefDefaultValueFilePath (int siteID, 563 String name); 564 565 575 public abstract void purgePageFields (int pageID) 576 throws JahiaException; 577 578 590 public abstract JahiaField contentFieldToJahiaField ( 591 ContentField contentField, 592 EntryLoadRequest entryLoadRequest) 593 throws JahiaException; 594 595 600 public abstract void invalidateCacheField (int fieldID); 601 602 608 public abstract void allowFieldsPreloadingForPage(int pageId); 609 610 } | Popular Tags |