Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

User Object and Permissions Changes

  • There have been extensive changes to how user permissions should be checked. The methods of the Permissions class should now be used.

    • For example

...

    • user.canRead(project)

...

    • Permissions.canReadProject(user, project)

...

      • Or $data.getSession().getAttribute("userHelper").canRead($item) to check permissions from a Velocity page
    • Another example is that now XNATUtils.getAllProjectIds(template)

...

    •  → Permissions.getAllProjectIds(template)

  • Some of the XNAT code was changed so it would work with UserI objects rather than XDATUser objects.
    • For example: TurbineUtils.getUser(data) → XDAT.getUserDetails()

      • In earlier versions of XNAT, the user object returned was a XDATUser. It now returns a UserI object, so you should modify your code as needed.

...

TurbineUtils.getUser(data)

...

XDAT.getUserDetails()

  • In Velocity: $user.getDisplayManager()

...

  • $data.getSession().getAttribute("userHelper").getDisplayManager()

...

  • (Or you can simply do $displayManager if page is a SecureScreen.)

  • You used to be able to access the user object directly in classes that extend SecureResource. So user → getUser()

...

  • user.isSiteAdmin()

...

  • Roles.isSiteAdmin(user

...

In Velocity: $turbineUtils.isSiteAdmin($user)

DICOM Changes

There have also been extensive changes to DICOM SCP classes, so any customizations related to this may need to be refactored. Classes that implement DicomProjectIdentifier should be modified. For example:

Legacy XNAT CodeXNAT 1.7 +

org.nrg.dcm.DicomSCPManager

org.nrg.dcm.scp.DicomSCPManager

org.nrg.dcm.preferences.DicomSCPInstance

org.nrg.dcm.scp.DicomSCPInstance
apply(XDATUser user, DicomObject o)apply(UserI user, DicomObject o)


XFT Changes

Legacy XNAT CodeXNAT 1.7 +
XFT.GetSiteURL()XDAT.getSiteConfigPreferences().getSiteUrl()
XFT.SetSiteURL(url)XDAT.getSiteConfigPreferences().setSiteUrl(url)
XFT.GetSiteID()XDAT.getSiteConfigPreferences().getSiteId()
XFT.SetSiteID(id)XDAT.getSiteConfigPreferences().setSiteId(id)

XFT.GetSiteURL()

XDAT.getSiteConfigPreferences().getSiteUrl()
XFT.SetSiteURL(url)XDAT.getSiteConfigPreferences().setSiteUrl(url)
XFT.GetAdminEmailHost()XDAT.getNotificationsPreferences().getSmtpHostname()

XFT.SetAdminEmailHost(host)

XDAT.getNotificationsPreferences().getSmtpHostname(host)

XFT.GetArchiveRootPath()XDAT.getSiteConfigPreferences().getArchivePath()
XFT.SetArchiveRootPath(path)XDAT.getSiteConfigPreferences().setArchivePath(path)
XFT.GetPrearchivePath()XDAT.getSiteConfigPreferences().getPrearchivePath()
XFT.SetPrearchivePath(path)XDAT.getSiteConfigPreferences().setPrearchivePath(path)
XFT.GetCachePath()XDAT.getSiteConfigPreferences().getCachePath()
XFT.SetCachePath(path)XDAT.getSiteConfigPreferences().setCachePath(path)
XFT.GetPipelinePath()XDAT.getSiteConfigPreferences().getPipelinePath()
XFT.SetPipelinePath(path)XDAT.getSiteConfigPreferences().setPipelinePath(path)
XFT.GetRequireLogin()XDAT.getSiteConfigPreferences().getRequireLogin()
XFT.SetRequireLogin(isRequired)XDAT.getSiteConfigPreferences().setRequireLogin(isRequired)
XFT.GetEmailVerification()XDAT.getSiteConfigPreferences().getEmailVerification()
XFT.SetEmailVerification(verificationRequired)XDAT.getSiteConfigPreferences().setEmailVerification(verificationRequired)
XFT.GetUserRegistration()XDAT.getSiteConfigPreferences().getUserRegistration()
XFT.SetUserRegistration(autoApprove)XDAT.getSiteConfigPreferences().setUserRegistration(autoApprove)
XFT.GetEnableCsrfToken()XDAT.getSiteConfigPreferences().getEnableCsrfToken()
XFT.SetEnableCsrfToken(enable)XDAT.getSiteConfigPreferences().setEnableCsrfToken(enable)


Package Changes

Legacy XNAT CodeXNAT 1.7 +
org.nrg.xnat.workflow.PipelineEmailHandlerAbstorg.nrg.xnat.event.listeners.PipelineEmailHandlerAbst
org.nrg.xft.event.Eventorg.nrg.xft.event.entities.WorkflowStatusEvent
org.nrg.status.StatusMessageorg.nrg.framework.status.StatusMessage
org.nrg.status.StatusQueueorg.nrg.framework.status.StatusQueue
org.nrg.status.ListenerUtilsorg.nrg.xnat.status.ListenerUtils
org.nrg.status.StatusProducerorg.nrg.framework.status.StatusPro
org.nrg.status.StatusProducerIorg.nrg.framework.status.StatusProducerI


Other Changes

Legacy XNAT CodeXNAT 1.7 +
GetArchiveRootPath()getArchiveRootPath()
setSecret(long secret)

setSecret(String secret) for AliasTokens

getSecret() now returns a String instead of a long

AdminUtils.getAdminEmailId()

XDAT.getSiteConfigPreferences().getAdminEmail()

XDAT.getNotificationsPreferences().getHelpContactInfo() is also available

AdminUtils.getMailServer()XDAT.getNotificationsPreferences().getSmtpHostname()


 

In your handler classes, you should change public void handleEvent(Event e, WrkWorkflowdata wrk){ to

...

Anchor
Changes since XNAT 1.7.0
Changes since XNAT 1.7.0

Changes since XNAT 1.7.0

...

XNAT 1.7.

...

0 - 1.7.2XNAT 1.7.3

...

+
org.nrg.dicom.mizer.service.

...

MizerExceptionorg.nrg.dicom.mizer.exceptions.MizerException

Between 1.7.2 and 1.7.3:

RestFileUtils.isFileRepresentationOfDirectory(file)

...

RestFileUtils.isFileRepresentationOfDirectoryOrEmpty(file)
XNAT.dom → XNAT.appXNAT.app
XNAT.dom.addFormCSRF()

...

XNAT.app.addFormCSRF()