-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail content write when item is in publish queue
- Loading branch information
Showing
17 changed files
with
347 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...n/java/org/craftercms/studio/api/v2/exception/content/ContentInPublishQueueException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (C) 2007-2024 Crafter Software Corporation. All Rights Reserved. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 3 as published by | ||
* the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.craftercms.studio.api.v2.exception.content; | ||
|
||
import org.craftercms.studio.api.v1.exception.ServiceLayerException; | ||
import org.craftercms.studio.api.v2.dal.publish.PublishPackage; | ||
|
||
import java.util.Collection; | ||
import java.util.Collections; | ||
|
||
/** | ||
* Exception to be thrown when attempting to perform an operation on content that is in workflow. | ||
*/ | ||
public class ContentInPublishQueueException extends ServiceLayerException { | ||
|
||
private final Collection<PublishPackage> publishPackages; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param message The exception message. | ||
* @param publishPackages The publish packages the item is in workflow for. | ||
*/ | ||
public ContentInPublishQueueException(final String message, final Collection<PublishPackage> publishPackages) { | ||
super(message); | ||
this.publishPackages = Collections.unmodifiableCollection(publishPackages); | ||
} | ||
|
||
public Collection<PublishPackage> getPublishPackages() { | ||
return publishPackages; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.