/** * Override to return whether or not a new entity can be inserted. * @param entityName name of an entity * * @return <code>true</code> if entity is insertable */ protected boolean _canInsert(String entityName) { return ERXProperties.booleanForKeyWithDefault("er.ajax.json." + entityName + ".canInsert", false); }
/** * Gets the actor. * @return current actor for the thread */ public static EOEnterpriseObject actor() { return (EOEnterpriseObject)ERXThreadStorage.valueForKey( "actor"); }
/** * Returns an external URL for the YUI libs to prepend via the property <code>er.yui.base</code> or the empty String. MUST end with "/" if set. * @return */ private static String yuiBase() { if(yuiBase == null) { yuiBase = ERXProperties.stringForKeyWithDefault("er.yui.base",""); } return yuiBase; }
public static void initialize() { String className = ERXProperties.stringForKeyWithDefault("er.corebusinesslogic.ERCAuditTrailClassName", ERCAuditTrailHandler.class.getName()); Class c = ERXPatcher.classForName(className); _handler = (ERCAuditTrailHandler) _NSUtilities.instantiateObject(c, new Class[]{}, new Object[]{}, true, false); NSSelector sel = ERXSelectorUtilities.notificationSelector("modelGroupDidLoad"); NSNotificationCenter.defaultCenter().addObserver(_handler, sel, ERXModelGroup.ModelGroupAddedNotification, null); }
static public boolean boolForString(String s) { return ERXValueUtilities.booleanValue(s); }
public AjaxFileUploadRequestHandler() { this(ERXProperties.stringForKey("er.ajax.AjaxFileRequestHandler.tempFileFolder"), ERXProperties.longForKeyWithDefault("er.ajax.AjaxFileRequestHandler.maxUploadSize", -1)); }
/** * Is Mail turned on * * @return if the Mail is turned on */ public static boolean usesMail(){ return ERXProperties.booleanForKey("er.corebusinesslogic.ERCUseMailFacility"); }
protected static void initialize() { NSNotificationCenter center = NSNotificationCenter.defaultCenter(); NSSelector sel = ERXSelectorUtilities.notificationSelector("updateTimestampForEditingContext"); Observer observer = new Observer(); ERXRetainer.retain(observer); center.addObserver(observer, sel, ERXExtensions.objectsWillChangeInEditingContext, null); }
/** * Gets the array of email addresses to send emails * about problems to. * @return array of email addresses */ public NSArray emailsForProblemRecipients() { if (_emailsForProblemRecipients == null) { _emailsForProblemRecipients = ERXProperties.arrayForKeyWithDefault(ProblemEmailRecipientsPropertyKey, NSArray.EmptyArray); } return _emailsForProblemRecipients; }
/** * @return a stopwatch timer, lazy initialized and started on first call of this method **/ public ERXStopWatch stopWatch() { if ( _stopWatch == null ) { _stopWatch = new ERXStopWatch(); _stopWatch.start(); isStopWatchRunning = true; } return _stopWatch; }
public String hostName() { return ERXConfigurationManager.defaultManager().hostName(); } }
static public String stringContentsOfFile(String path) { return ERXStringUtilities.stringWithContentsOfFile(path); }
public ERCoreBusinessLogic0() { super(ERXProperties.arrayForKey("ERCoreBusinessLogic0.languages")); }
/** * <span class="en"> Returns the SMTP protocol to use for connections. </span> * * <span class="ja"> 接続の為の SMTP プロトコールを設定します。 (smtp or smtps) * * @param contextString * - SMTP プロトコール名 </span> */ public String smtpProtocolForContext(String contextString) { String contextSuffix = (contextString == null) ? "" : ("." + contextString); return ERXProperties.stringForKeyWithDefault("er.javamail.smtpProtocol" + contextSuffix, ERXProperties.stringForKeyWithDefault("er.javamail.smtpProtocol", ERXProperties.stringForKeyWithDefault("mail.smtp.protocol", "smtp"))); }
/** * Returns whether or not read-only entities should be touched. This setting is only here in case there is a performance * issue introduced by looking up the entity() in touch(), so we can roll it back out. * * @return whether or not read-only entities should be touched (defaults to false) */ protected static boolean touchReadOnlyEntities() { if (_touchReadOnlyEntities == null) { // MS: don't worry about double-null check this-and-that .. it's a Boolean, so no constructor and worst case we double-check a property _touchReadOnlyEntities = ERXProperties.booleanForKeyWithDefault("er.corebusinesslogic.ERCStampedEnterpriseObject.touchReadOnlyEntities", false); } return _touchReadOnlyEntities; }
public boolean shouldMailReportedExceptions() { return ERXProperties.booleanForKey("er.corebusinesslogic.ERCoreBusinessLogic.ShouldMailExceptions"); }
/** * <span class="en"> Gets the array of white list email address patterns. * * @return array of white list email address patterns </span> * * <span class="ja"> ホワイト・リスト・メールアドレス配列パターンを戻します。 * * @return ホワイト・リスト・メールアドレス配列パターン </span> */ @SuppressWarnings("unchecked") public NSArray<String> whiteListEmailAddressPatterns() { if (whiteListEmailAddressPatterns == null) { whiteListEmailAddressPatterns = ERXProperties.arrayForKeyWithDefault("er.javamail.WhiteListEmailAddressPatterns", NSArray.EmptyArray); } return whiteListEmailAddressPatterns; }
/** @return a status message that is displayed if the task does not provide a status message */ public String defaultStatus() { if ( _defaultStatus == null ) { _defaultStatus = ERXProperties.stringForKeyWithDefault("er.coolcomponents.CCAjaxLongResponsePage.defaultStatus", "Please wait..."); } return _defaultStatus; }
public boolean canClickToOpen() { return ERXProperties.booleanForKeyWithDefault("er.component.clickToOpen", false); }
protected static boolean shouldDeleteSentMail() { return ERXProperties.booleanForKeyWithDefault("er.javamail.mailer.ERMailer.ShouldDeleteSentMail", true); }