Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ protected void init()
{
addController(PanoramaPublicController.NAME, PanoramaPublicController.class);
PanoramaPublicSchema.register(this);
AttachmentService.get().registerAttachmentType(CatalogImageAttachmentType.get());
AttachmentService.get().registerAttachmentType(PanoramaPublicLogoResourceType.get());
AttachmentService.get().registerAttachmentParentType(CatalogImageAttachmentType.get());
AttachmentService.get().registerAttachmentParentType(PanoramaPublicLogoResourceType.get());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.attachments.AttachmentType;
import org.labkey.api.attachments.AttachmentParentType;
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
import org.labkey.panoramapublic.model.Journal;
Expand All @@ -29,7 +29,7 @@ public static PanoramaPublicLogoAttachmentParent get()
}

@Override
public @NotNull AttachmentType getAttachmentType()
public @NotNull AttachmentParentType getAttachmentParentType()
{
return PanoramaPublicLogoResourceType.get();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.labkey.panoramapublic.bluesky;

import org.jetbrains.annotations.NotNull;
import org.labkey.api.attachments.AttachmentType;
import org.labkey.api.attachments.AttachmentParentType;
import org.labkey.api.data.CoreSchema;
import org.labkey.api.data.SQLFragment;

public class PanoramaPublicLogoResourceType implements AttachmentType
public class PanoramaPublicLogoResourceType implements AttachmentParentType
{
private static final PanoramaPublicLogoResourceType INSTANCE = new PanoramaPublicLogoResourceType();

Expand All @@ -21,17 +21,17 @@ private PanoramaPublicLogoResourceType()
@Override
public @NotNull String getUniqueName()
{
return getClass().getName();
return "PanoramaPublicLogoResource";
}

@Override
public void addWhereSql(SQLFragment sql, String parentColumn, String documentNameColumn)
{
sql.append(parentColumn).append(" IN (SELECT EntityId FROM ")
.append(CoreSchema.getInstance().getTableInfoContainers(), "c").append(")")
.append(" AND (")
.append(documentNameColumn).append(" LIKE ")
.appendStringLiteral(PanoramaPublicLogoManager.LOGO_FILE_PREFIX + "%", CoreSchema.getInstance().getSqlDialect())
.append(") ");
.append(CoreSchema.getInstance().getTableInfoContainers(), "c").append(")")
.append(" AND (")
.append(documentNameColumn).append(" LIKE ")
.appendStringLiteral(PanoramaPublicLogoManager.LOGO_FILE_PREFIX + "%", CoreSchema.getInstance().getSqlDialect())
.append(") ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.jetbrains.annotations.NotNull;
import org.labkey.api.attachments.AttachmentParent;
import org.labkey.api.attachments.AttachmentType;
import org.labkey.api.attachments.AttachmentParentType;
import org.labkey.api.data.Container;
import org.labkey.api.view.ShortURLRecord;

Expand All @@ -29,7 +29,7 @@ public String getContainerId()
}

@Override
public @NotNull AttachmentType getAttachmentType()
public @NotNull AttachmentParentType getAttachmentParentType()
{
return CatalogImageAttachmentType.get();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.labkey.panoramapublic.catalog;

import org.jetbrains.annotations.NotNull;
import org.labkey.api.attachments.AttachmentType;
import org.labkey.api.attachments.AttachmentParentType;
import org.labkey.api.data.CoreSchema;
import org.labkey.api.data.SQLFragment;

public class CatalogImageAttachmentType implements AttachmentType
public class CatalogImageAttachmentType implements AttachmentParentType
{
private static final CatalogImageAttachmentType INSTANCE = new CatalogImageAttachmentType();

Expand All @@ -21,7 +21,7 @@ private CatalogImageAttachmentType()
@Override
public @NotNull String getUniqueName()
{
return getClass().getName();
return "CatalogImage";
}

@Override
Expand Down