Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
bba15ee4
Commit
bba15ee4
authored
10 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1281: cast the right object in the right order, MetaTagged and than get MetaInfo
parent
e69d09ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/olat/catalog/CatalogManager.java
+11
-4
11 additions, 4 deletions
src/main/java/org/olat/catalog/CatalogManager.java
src/main/java/org/olat/repository/RepositoryManager.java
+11
-4
11 additions, 4 deletions
src/main/java/org/olat/repository/RepositoryManager.java
with
22 additions
and
8 deletions
src/main/java/org/olat/catalog/CatalogManager.java
+
11
−
4
View file @
bba15ee4
...
...
@@ -41,6 +41,7 @@ import org.olat.basesecurity.SecurityGroup;
import
org.olat.basesecurity.SecurityGroupMembershipImpl
;
import
org.olat.core.commons.modules.bc.FolderConfig
;
import
org.olat.core.commons.modules.bc.meta.MetaInfo
;
import
org.olat.core.commons.modules.bc.meta.tagged.MetaTagged
;
import
org.olat.core.commons.persistence.DB
;
import
org.olat.core.commons.persistence.PersistenceHelper
;
import
org.olat.core.commons.services.image.ImageService
;
...
...
@@ -691,8 +692,11 @@ public class CatalogManager extends BasicManager implements UserDataDeletable, I
public
void
deleteImage
(
CatalogEntryRef
entry
)
{
VFSLeaf
imgFile
=
getImage
(
entry
);
if
(
imgFile
!=
null
)
{
if
(
imgFile
instanceof
MetaInfo
)
{
((
MetaInfo
)
imgFile
).
clearThumbnails
();
if
(
imgFile
instanceof
MetaTagged
)
{
MetaInfo
info
=
((
MetaTagged
)
imgFile
).
getMetaInfo
();
if
(
info
!=
null
)
{
info
.
clearThumbnails
();
}
}
imgFile
.
delete
();
}
...
...
@@ -701,8 +705,11 @@ public class CatalogManager extends BasicManager implements UserDataDeletable, I
public
boolean
setImage
(
VFSLeaf
newImageFile
,
CatalogEntryRef
re
)
{
VFSLeaf
currentImage
=
getImage
(
re
);
if
(
currentImage
!=
null
)
{
if
(
currentImage
instanceof
MetaInfo
)
{
((
MetaInfo
)
currentImage
).
clearThumbnails
();
if
(
currentImage
instanceof
MetaTagged
)
{
MetaInfo
info
=
((
MetaTagged
)
currentImage
).
getMetaInfo
();
if
(
info
!=
null
)
{
info
.
clearThumbnails
();
}
}
currentImage
.
delete
();
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/olat/repository/RepositoryManager.java
+
11
−
4
View file @
bba15ee4
...
...
@@ -48,6 +48,7 @@ import org.olat.catalog.CatalogEntry;
import
org.olat.core.CoreSpringFactory
;
import
org.olat.core.commons.modules.bc.FolderConfig
;
import
org.olat.core.commons.modules.bc.meta.MetaInfo
;
import
org.olat.core.commons.modules.bc.meta.tagged.MetaTagged
;
import
org.olat.core.commons.persistence.DB
;
import
org.olat.core.commons.persistence.DBQuery
;
import
org.olat.core.commons.persistence.PersistenceHelper
;
...
...
@@ -169,8 +170,11 @@ public class RepositoryManager extends BasicManager {
public
void
deleteImage
(
RepositoryEntry
re
)
{
VFSLeaf
imgFile
=
getImage
(
re
);
if
(
imgFile
!=
null
)
{
if
(
imgFile
instanceof
MetaInfo
)
{
((
MetaInfo
)
imgFile
).
clearThumbnails
();
if
(
imgFile
instanceof
MetaTagged
)
{
MetaInfo
info
=
((
MetaTagged
)
imgFile
).
getMetaInfo
();
if
(
info
!=
null
)
{
info
.
clearThumbnails
();
}
}
imgFile
.
delete
();
}
...
...
@@ -194,8 +198,11 @@ public class RepositoryManager extends BasicManager {
public
boolean
setImage
(
VFSLeaf
newImageFile
,
RepositoryEntry
re
)
{
VFSLeaf
currentImage
=
getImage
(
re
);
if
(
currentImage
!=
null
)
{
if
(
currentImage
instanceof
MetaInfo
)
{
((
MetaInfo
)
currentImage
).
clearThumbnails
();
if
(
currentImage
instanceof
MetaTagged
)
{
MetaInfo
info
=
((
MetaTagged
)
currentImage
).
getMetaInfo
();
if
(
info
!=
null
)
{
info
.
clearThumbnails
();
}
}
currentImage
.
delete
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment