Open Monograph Press  3.3.0
Application.inc.php
1 <?php
2 
18 import('lib.pkp.classes.core.PKPApplication');
19 
20 define('REQUIRES_XSL', true);
21 
22 define('ASSOC_TYPE_MONOGRAPH', ASSOC_TYPE_SUBMISSION);
23 define('ASSOC_TYPE_PUBLICATION_FORMAT', ASSOC_TYPE_REPRESENTATION);
24 
25 define('ASSOC_TYPE_PRESS', 0x0000200);
26 define('ASSOC_TYPE_SERIES', ASSOC_TYPE_SECTION);
27 
28 define('ASSOC_TYPE_CHAPTER', 0x0000214);
29 
30 define('CONTEXT_PRESS', 1);
31 
32 define('LANGUAGE_PACK_DESCRIPTOR_URL', 'http://pkp.sfu.ca/omp/xml/%s/locales.xml');
33 define('LANGUAGE_PACK_TAR_URL', 'http://pkp.sfu.ca/omp/xml/%s/%s.tar.gz');
34 
35 define('METRIC_TYPE_COUNTER', 'omp::counter');
36 
37 class Application extends PKPApplication {
38 
46  public function getContextDepth() {
47  return 1;
48  }
49 
54  public function getContextList() {
55  return array('press');
56  }
57 
62  public static function getName() {
63  return 'omp';
64  }
65 
70  public function getNameKey() {
71  return('common.software');
72  }
73 
79  public function getVersionDescriptorUrl() {
80  return('http://pkp.sfu.ca/omp/xml/omp-version.xml');
81  }
82 
87  public function getDAOMap() {
88  return array_merge(parent::getDAOMap(), array(
89  'AuthorDAO' => 'classes.monograph.AuthorDAO',
90  'ChapterAuthorDAO' => 'classes.monograph.ChapterAuthorDAO',
91  'ChapterDAO' => 'classes.monograph.ChapterDAO',
92  'FeatureDAO' => 'classes.press.FeatureDAO',
93  'IdentificationCodeDAO' => 'classes.publicationFormat.IdentificationCodeDAO',
94  'LayoutAssignmentDAO' => 'submission.layoutAssignment.LayoutAssignmentDAO',
95  'MarketDAO' => 'classes.publicationFormat.MarketDAO',
96  'MetricsDAO' => 'lib.pkp.classes.statistics.PKPMetricsDAO',
97  'SubmissionDAO' => 'classes.submission.SubmissionDAO',
98  'MonographFileEmailLogDAO' => 'classes.log.MonographFileEmailLogDAO',
99  'MonographSearchDAO' => 'classes.search.MonographSearchDAO',
100  'NewReleaseDAO' => 'classes.press.NewReleaseDAO',
101  'OAIDAO' => 'classes.oai.omp.OAIDAO',
102  'OMPCompletedPaymentDAO' => 'classes.payment.omp.OMPCompletedPaymentDAO',
103  'ONIXCodelistItemDAO' => 'classes.codelist.ONIXCodelistItemDAO',
104  'PressDAO' => 'classes.press.PressDAO',
105  'PressSettingsDAO' => 'classes.press.PressSettingsDAO',
106  'ProductionAssignmentDAO' => 'classes.submission.productionAssignment.ProductionAssignmentDAO',
107  'PublicationDateDAO' => 'classes.publicationFormat.PublicationDateDAO',
108  'PublicationFormatDAO' => 'classes.publicationFormat.PublicationFormatDAO',
109  'QualifierDAO' => 'classes.codelist.QualifierDAO',
110  'RepresentativeDAO' => 'classes.monograph.RepresentativeDAO',
111  'ReviewerSubmissionDAO' => 'classes.submission.reviewer.ReviewerSubmissionDAO',
112  'SalesRightsDAO' => 'classes.publicationFormat.SalesRightsDAO',
113  'SeriesDAO' => 'classes.press.SeriesDAO',
114  'SpotlightDAO' => 'classes.spotlight.SpotlightDAO',
115  'SubjectDAO' => 'classes.codelist.SubjectDAO',
116  ));
117  }
118 
123  public function getPluginCategories() {
124  return array(
125  // NB: Meta-data plug-ins are first in the list as this
126  // will make them being loaded (and installed) first.
127  // This is necessary as several other plug-in categories
128  // depend on meta-data. This is a very rudimentary type of
129  // dependency management for plug-ins.
130  'metadata',
131  'pubIds',
132  'blocks',
133  'generic',
134  'gateways',
135  'themes',
136  'importexport',
137  'oaiMetadataFormats',
138  'paymethod',
139  );
140  }
141 
145  public static function getContextDAO() {
146  return DAORegistry::getDAO('PressDAO');
147  }
148 
153  public static function getSectionDAO() {
154  return DAORegistry::getDAO('SeriesDAO');
155  }
156 
160  public static function getRepresentationDAO() {
161  return DAORegistry::getDAO('PublicationFormatDAO');
162  }
163 
167  public static function getSubmissionSearchIndex() {
168  import('classes.search.MonographSearchIndex');
169  return new MonographSearchIndex();
170  }
171 
175  public static function getSubmissionSearchDAO() {
176  return DAORegistry::getDAO('MonographSearchDAO');
177  }
178 
182  public static function getApplicationStages() {
183  // We leave out WORKFLOW_STAGE_ID_PUBLISHED since it technically is not a 'stage'.
184  return array(
185  WORKFLOW_STAGE_ID_SUBMISSION,
186  WORKFLOW_STAGE_ID_INTERNAL_REVIEW,
187  WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,
188  WORKFLOW_STAGE_ID_EDITING,
189  WORKFLOW_STAGE_ID_PRODUCTION
190  );
191  }
192 
196  public static function getFileDirectories() {
197  return array('context' => '/presses/', 'submission' => '/monographs/');
198  }
199 
203  public static function getContextAssocType() {
204  return ASSOC_TYPE_PRESS;
205  }
206 
212  public static function getPaymentManager($context) {
213  import('classes.payment.omp.OMPPaymentManager');
214  return new OMPPaymentManager($context);
215  }
216 }
Application\getContextDAO
static getContextDAO()
Definition: Application.inc.php:145
Application\getRepresentationDAO
static getRepresentationDAO()
Definition: Application.inc.php:160
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
Application\getNameKey
getNameKey()
Definition: Application.inc.php:70
Application\getPluginCategories
getPluginCategories()
Definition: Application.inc.php:123
Application\getName
static getName()
Definition: Application.inc.php:62
Application
Class describing this application.
Definition: Application.inc.php:37
Application\getPaymentManager
static getPaymentManager($context)
Definition: Application.inc.php:212
OMPPaymentManager
Provides payment management functions.
Definition: OMPPaymentManager.inc.php:24
PKPApplication
Class describing this application.
Definition: PKPApplication.inc.php:116
Application\getDAOMap
getDAOMap()
Definition: Application.inc.php:87
Application\getContextAssocType
static getContextAssocType()
Definition: Application.inc.php:203
Application\getFileDirectories
static getFileDirectories()
Definition: Application.inc.php:196
MonographSearchIndex
Class to add content to the monograph search index.
Definition: MonographSearchIndex.inc.php:18
Application\getSubmissionSearchIndex
static getSubmissionSearchIndex()
Definition: Application.inc.php:167
Application\getVersionDescriptorUrl
getVersionDescriptorUrl()
Definition: Application.inc.php:79
Application\getSubmissionSearchDAO
static getSubmissionSearchDAO()
Definition: Application.inc.php:175
Application\getContextList
getContextList()
Definition: Application.inc.php:54
Application\getApplicationStages
static getApplicationStages()
Definition: Application.inc.php:182
Application\getContextDepth
getContextDepth()
Definition: Application.inc.php:46
Application\getSectionDAO
static getSectionDAO()
Definition: Application.inc.php:153