public boolean isConditionallyReleased() { try { return this.m_properties.getBooleanProperty(ConditionService.PROP_CONDITIONAL_RELEASE); } catch (EntityPropertyNotDefinedException e) { return false; } catch (EntityPropertyTypeException e) { return false; } }
/** * @inheritDoc */ protected boolean requiresCopyrightAgreement() { // check the copyright alert setting // return true only if the copyright alert property is set and value is true try { return m_properties.getBooleanProperty(ResourceProperties.PROP_COPYRIGHT_ALERT); } catch (Exception e) { // if there is no such copyright alert property, return false return false; } }
public void setConditionallyReleased(boolean isConditionallyReleased) { try { Boolean oldValue = this.m_properties.getBooleanProperty(ConditionService.PROP_CONDITIONAL_RELEASE); if(oldValue.booleanValue() != isConditionallyReleased) { this.m_visibilityUpdated = true; } } catch (EntityPropertyNotDefinedException e) { // oldValue is false if(isConditionallyReleased) { this.m_visibilityUpdated = true; } } catch (EntityPropertyTypeException e) { // assume oldValue is false if(isConditionallyReleased) { this.m_visibilityUpdated = true; } } m_properties.addProperty(ConditionService.PROP_CONDITIONAL_RELEASE, Boolean.toString(isConditionallyReleased)); }